This commit is contained in:
Kristian Knarvik 2018-01-30 23:38:22 +01:00
parent 85e4fa4fc7
commit f085cab71f
3 changed files with 7 additions and 10 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -17,8 +17,8 @@ import java.util.ArrayList;
public class ServerConsoles {
private static ServerConsoles serverConsoles;
private static ArrayList<Console> consoles = new ArrayList<>();
private JFrame frame;
private JTabbedPane consolesTab;
private final JFrame frame;
private final JTabbedPane consolesTab;
public ServerConsoles() {
frame = new JFrame();