From dc49bbc088ac4febe8f5043ccb630cda32068d1c Mon Sep 17 00:00:00 2001 From: Charles Siqueira Alves Date: Fri, 5 Feb 2021 10:30:05 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20corrigindo=20abertura=20do=20arquivo=20d?= =?UTF-8?q?e=20configura=C3=A7=C3=A3o=20para=20que=20o=20usu=C3=A1rio=20es?= =?UTF-8?q?colha=20a=20aplica=C3=A7=C3=A3o=20em=20que=20deseja=20edita-lo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/br/Painelconfig.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/br/Painelconfig.java b/src/main/java/br/Painelconfig.java index bbbdd8b..d998a28 100644 --- a/src/main/java/br/Painelconfig.java +++ b/src/main/java/br/Painelconfig.java @@ -5,7 +5,6 @@ import javax.swing.*; import java.awt.*; import java.io.IOException; -import java.nio.file.WatchService; public class Painelconfig extends JPanel { @@ -14,7 +13,6 @@ public class Painelconfig extends JPanel { JButton btnAbrirArquivoConfig; public Painelconfig() { - setLayout(new BorderLayout()); painelNorte = new JPanel(); @@ -26,7 +24,7 @@ public Painelconfig() { this.painelNorte.add(this.btnAbrirArquivoConfig); btnAbrirArquivoConfig.addActionListener(e -> { try { - Runtime.getRuntime().exec(new String[]{"notepad.exe", Config.arquivoProperties.getCanonicalPath()}); + Desktop.getDesktop().open(Config.arquivoProperties.getCanonicalFile()); } catch (IOException ex) { ex.printStackTrace(); } @@ -36,9 +34,5 @@ public Painelconfig() { textAreaConfig.setEditable(false); JScrollPane scrollPane = new JScrollPane(this.textAreaConfig); this.add(scrollPane, BorderLayout.CENTER); - - } - - }