Cleanup
This commit is contained in:
parent
85e4fa4fc7
commit
f085cab71f
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user