diff --git a/src/net/knarcraft/serverlauncher/userinterface/Console.java b/src/net/knarcraft/serverlauncher/userinterface/Console.java index cc11b96..65dfaf4 100644 --- a/src/net/knarcraft/serverlauncher/userinterface/Console.java +++ b/src/net/knarcraft/serverlauncher/userinterface/Console.java @@ -12,8 +12,8 @@ import java.awt.*; * @since 0.0.0.1 */ class Console { - private JTextField textInput; - private JTextArea textOutput; + private final JTextField textInput; + private final JTextArea textOutput; void output(String text) { this.textOutput.setText(text); diff --git a/src/net/knarcraft/serverlauncher/userinterface/GUI.java b/src/net/knarcraft/serverlauncher/userinterface/GUI.java index 9bb8efd..41ec0d7 100644 --- a/src/net/knarcraft/serverlauncher/userinterface/GUI.java +++ b/src/net/knarcraft/serverlauncher/userinterface/GUI.java @@ -384,6 +384,8 @@ public class GUI implements ActionListener { this.serversPane = tabbedPane_1; tabbedPane_1.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); + frame.setPreferredSize(frame.getPreferredSize()); + frame.validate(); frame.setVisible(true); } @@ -426,12 +428,7 @@ public class GUI implements ActionListener { goToURL("https://knarcraft.net/Bungeeminecraftserverlauncher/Story/"); } else if (e.getSource() == btnStartServer) { this.save(); - Executors.newSingleThreadExecutor().execute(new Runnable() { - @Override - public void run() { - Server.startServers(); - } - }); + Executors.newSingleThreadExecutor().execute(Server::startServers); } else if (e.getSource() == btnStopServer) { stop(); } else if (e.getSource() == addServer) { diff --git a/src/net/knarcraft/serverlauncher/userinterface/ServerConsoles.java b/src/net/knarcraft/serverlauncher/userinterface/ServerConsoles.java index 799ad3e..697ba6c 100644 --- a/src/net/knarcraft/serverlauncher/userinterface/ServerConsoles.java +++ b/src/net/knarcraft/serverlauncher/userinterface/ServerConsoles.java @@ -17,8 +17,8 @@ import java.util.ArrayList; public class ServerConsoles { private static ServerConsoles serverConsoles; private static ArrayList consoles = new ArrayList<>(); - private JFrame frame; - private JTabbedPane consolesTab; + private final JFrame frame; + private final JTabbedPane consolesTab; public ServerConsoles() { frame = new JFrame();