Cleanup
This commit is contained in:
parent
85e4fa4fc7
commit
f085cab71f
@ -12,8 +12,8 @@ import java.awt.*;
|
|||||||
* @since 0.0.0.1
|
* @since 0.0.0.1
|
||||||
*/
|
*/
|
||||||
class Console {
|
class Console {
|
||||||
private JTextField textInput;
|
private final JTextField textInput;
|
||||||
private JTextArea textOutput;
|
private final JTextArea textOutput;
|
||||||
|
|
||||||
void output(String text) {
|
void output(String text) {
|
||||||
this.textOutput.setText(text);
|
this.textOutput.setText(text);
|
||||||
|
@ -384,6 +384,8 @@ public class GUI implements ActionListener {
|
|||||||
this.serversPane = tabbedPane_1;
|
this.serversPane = tabbedPane_1;
|
||||||
tabbedPane_1.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
|
tabbedPane_1.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
|
||||||
|
|
||||||
|
frame.setPreferredSize(frame.getPreferredSize());
|
||||||
|
frame.validate();
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,12 +428,7 @@ public class GUI implements ActionListener {
|
|||||||
goToURL("https://knarcraft.net/Bungeeminecraftserverlauncher/Story/");
|
goToURL("https://knarcraft.net/Bungeeminecraftserverlauncher/Story/");
|
||||||
} else if (e.getSource() == btnStartServer) {
|
} else if (e.getSource() == btnStartServer) {
|
||||||
this.save();
|
this.save();
|
||||||
Executors.newSingleThreadExecutor().execute(new Runnable() {
|
Executors.newSingleThreadExecutor().execute(Server::startServers);
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Server.startServers();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (e.getSource() == btnStopServer) {
|
} else if (e.getSource() == btnStopServer) {
|
||||||
stop();
|
stop();
|
||||||
} else if (e.getSource() == addServer) {
|
} else if (e.getSource() == addServer) {
|
||||||
|
@ -17,8 +17,8 @@ import java.util.ArrayList;
|
|||||||
public class ServerConsoles {
|
public class ServerConsoles {
|
||||||
private static ServerConsoles serverConsoles;
|
private static ServerConsoles serverConsoles;
|
||||||
private static ArrayList<Console> consoles = new ArrayList<>();
|
private static ArrayList<Console> consoles = new ArrayList<>();
|
||||||
private JFrame frame;
|
private final JFrame frame;
|
||||||
private JTabbedPane consolesTab;
|
private final JTabbedPane consolesTab;
|
||||||
|
|
||||||
public ServerConsoles() {
|
public ServerConsoles() {
|
||||||
frame = new JFrame();
|
frame = new JFrame();
|
||||||
|
Loading…
Reference in New Issue
Block a user