EpicKnarvik97 194686b9d8
Some checks failed
KnarCraft/Minecraft-Server-Launcher/master There was a failure building this commit
Makes the project into a Maven project
Moves stuff around
Adds Jenkinsfile
Changes some package names
Replaces library with Maven dependency
2020-02-12 21:30:36 +01:00

39 lines
1.0 KiB
Java

package net.knarcraft.minecraftserverlauncher.userinterface;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
/**
* A parent window for server consoles.
* Should be toggled with the "View server consoles" button.
* Keeps track of all consoles.
*
* @author Kristian Knarvik <kristian.knarvik@knett.no>
* @version 1.0.0
* @since 1.0.0
*/
public class ServerConsoles {
private static JFrame frame;
private static JTabbedPane consolesTab;
public ServerConsoles() {
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
consolesTab = new JTabbedPane(JTabbedPane.TOP);
frame.getContentPane().add(consolesTab, BorderLayout.CENTER);
}
public static Console addTab(String name) {
return new Console(consolesTab, name);
}
public static void show() {
frame.setVisible(true);
}
public static JTabbedPane getTab() {
return consolesTab;
}
}