2018-01-26 20:26:16 +01:00
|
|
|
package net.knarcraft.serverlauncher.userinterface;
|
|
|
|
|
|
|
|
import javax.swing.*;
|
2018-01-27 23:34:02 +01:00
|
|
|
|
2018-01-26 20:26:16 +01:00
|
|
|
public class GUI {
|
2018-01-27 23:34:02 +01:00
|
|
|
|
|
|
|
private JFrame frame;
|
|
|
|
private JTabbedPane serversPane;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the application.
|
|
|
|
*/
|
2018-01-26 20:26:16 +01:00
|
|
|
public GUI() {
|
2018-01-27 23:34:02 +01:00
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
public JFrame getFrame() {
|
|
|
|
return this.frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the contents of the frame.
|
|
|
|
*/
|
|
|
|
private void initialize() {
|
2018-01-26 22:17:36 +01:00
|
|
|
try {
|
|
|
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
2018-01-26 23:15:19 +01:00
|
|
|
} catch (ClassNotFoundException | UnsupportedLookAndFeelException | InstantiationException | IllegalAccessException e) {
|
2018-01-26 22:17:36 +01:00
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
|
2018-01-27 23:34:02 +01:00
|
|
|
frame = new JFrame();
|
|
|
|
frame.setBounds(100, 100, 391, 219);
|
2018-01-26 20:26:16 +01:00
|
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
2018-01-27 23:34:02 +01:00
|
|
|
frame.setResizable(false);
|
2018-01-26 20:26:16 +01:00
|
|
|
|
2018-01-27 23:34:02 +01:00
|
|
|
JMenuBar menuBar = new JMenuBar();
|
|
|
|
frame.setJMenuBar(menuBar);
|
|
|
|
|
|
|
|
JMenu mnOptions = new JMenu("Options");
|
|
|
|
menuBar.add(mnOptions);
|
|
|
|
|
|
|
|
JCheckBoxMenuItem chckbxmntmRunInBackground = new JCheckBoxMenuItem("Run in background on exit");
|
|
|
|
mnOptions.add(chckbxmntmRunInBackground);
|
|
|
|
|
|
|
|
JCheckBoxMenuItem chckbxmntmDelayStartup = new JCheckBoxMenuItem("Delay Startup");
|
|
|
|
mnOptions.add(chckbxmntmDelayStartup);
|
|
|
|
|
|
|
|
JCheckBoxMenuItem chckbxmntmDownloadJars = new JCheckBoxMenuItem("Download jars");
|
|
|
|
mnOptions.add(chckbxmntmDownloadJars);
|
|
|
|
|
|
|
|
JMenu mnHelp = new JMenu("Help");
|
|
|
|
menuBar.add(mnHelp);
|
|
|
|
|
|
|
|
JMenuItem mntmErrors = new JMenuItem("Errors");
|
|
|
|
mnHelp.add(mntmErrors);
|
|
|
|
|
|
|
|
JMenuItem mntmSetup = new JMenuItem("Setup");
|
|
|
|
mnHelp.add(mntmSetup);
|
|
|
|
|
|
|
|
JMenuItem mntmWarning = new JMenuItem("Warning");
|
|
|
|
mnHelp.add(mntmWarning);
|
|
|
|
|
|
|
|
JMenuItem mntmManualUpdate = new JMenuItem("Manual update");
|
|
|
|
mnHelp.add(mntmManualUpdate);
|
|
|
|
|
|
|
|
JMenu mnInfo = new JMenu("Info");
|
|
|
|
menuBar.add(mnInfo);
|
|
|
|
|
|
|
|
JMenu mnOptions_1 = new JMenu("Options");
|
|
|
|
mnInfo.add(mnOptions_1);
|
|
|
|
|
|
|
|
JMenuItem mntmRunInBackground = new JMenuItem("Run in background on exit");
|
|
|
|
mnOptions_1.add(mntmRunInBackground);
|
|
|
|
|
|
|
|
JMenuItem mntmDelayStartup = new JMenuItem("Delay Startup");
|
|
|
|
mnOptions_1.add(mntmDelayStartup);
|
|
|
|
|
|
|
|
JMenuItem mntmDownloadJars = new JMenuItem("Download jars");
|
|
|
|
mnOptions_1.add(mntmDownloadJars);
|
|
|
|
|
|
|
|
JMenu mnAbout = new JMenu("About");
|
|
|
|
mnInfo.add(mnAbout);
|
|
|
|
|
|
|
|
JMenuItem mntmAbout = new JMenuItem("About");
|
|
|
|
mnAbout.add(mntmAbout);
|
|
|
|
|
|
|
|
JMenuItem mntmStory = new JMenuItem("Story");
|
|
|
|
mnAbout.add(mntmStory);
|
|
|
|
frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.X_AXIS));
|
|
|
|
|
|
|
|
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
|
|
frame.getContentPane().add(tabbedPane);
|
|
|
|
|
|
|
|
JPanel panel = new JPanel();
|
|
|
|
tabbedPane.addTab("Control panel", null, panel, null);
|
|
|
|
SpringLayout sl_panel = new SpringLayout();
|
|
|
|
panel.setLayout(sl_panel);
|
|
|
|
|
|
|
|
JLabel lblBasicControls = new JLabel("Basic controls");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, lblBasicControls, 10, SpringLayout.NORTH, panel);
|
|
|
|
panel.add(lblBasicControls);
|
|
|
|
|
|
|
|
JButton btnStartServer = new JButton("Start servers");
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, lblBasicControls, 0, SpringLayout.WEST, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.SOUTH, lblBasicControls, -6, SpringLayout.NORTH, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, btnStartServer, 30, SpringLayout.NORTH, panel);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, btnStartServer, 10, SpringLayout.WEST, panel);
|
|
|
|
panel.add(btnStartServer);
|
|
|
|
|
|
|
|
JButton btnStopServer = new JButton("Stop servers");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, btnStopServer, 0, SpringLayout.NORTH, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, btnStopServer, 6, SpringLayout.EAST, btnStartServer);
|
|
|
|
panel.add(btnStopServer);
|
|
|
|
|
|
|
|
JLabel lblProfile = new JLabel("Profile");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, lblProfile, 6, SpringLayout.SOUTH, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, lblProfile, 10, SpringLayout.WEST, panel);
|
|
|
|
panel.add(lblProfile);
|
|
|
|
|
|
|
|
JButton button = new JButton("+");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, button, 6, SpringLayout.SOUTH, lblProfile);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, button, 10, SpringLayout.WEST, panel);
|
|
|
|
panel.add(button);
|
2018-01-26 22:17:36 +01:00
|
|
|
|
2018-01-27 23:34:02 +01:00
|
|
|
JButton button_1 = new JButton("-");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, button_1, 0, SpringLayout.NORTH, button);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, button_1, 6, SpringLayout.EAST, button);
|
|
|
|
panel.add(button_1);
|
|
|
|
|
|
|
|
JComboBox comboBox = new JComboBox();
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, comboBox, 1, SpringLayout.NORTH, button);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, comboBox, 6, SpringLayout.EAST, button_1);
|
|
|
|
sl_panel.putConstraint(SpringLayout.EAST, comboBox, 124, SpringLayout.EAST, button_1);
|
|
|
|
panel.add(comboBox);
|
|
|
|
|
|
|
|
JLabel lblStatuslabel = new JLabel("StatusLabel");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, lblStatuslabel, 15, SpringLayout.SOUTH, button);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, lblStatuslabel, 10, SpringLayout.WEST, panel);
|
|
|
|
sl_panel.putConstraint(SpringLayout.EAST, lblStatuslabel, 386, SpringLayout.WEST, panel);
|
|
|
|
panel.add(lblStatuslabel);
|
|
|
|
|
|
|
|
JButton button_3 = new JButton("Add server");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, button_3, 0, SpringLayout.NORTH, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, button_3, 6, SpringLayout.EAST, btnStopServer);
|
|
|
|
panel.add(button_3);
|
|
|
|
|
|
|
|
JButton button_4 = new JButton("Backup");
|
|
|
|
sl_panel.putConstraint(SpringLayout.NORTH, button_4, 0, SpringLayout.NORTH, btnStartServer);
|
|
|
|
sl_panel.putConstraint(SpringLayout.WEST, button_4, 6, SpringLayout.EAST, button_3);
|
|
|
|
panel.add(button_4);
|
|
|
|
|
|
|
|
JPanel panel_1 = new JPanel();
|
|
|
|
tabbedPane.addTab("Control servers", null, panel_1, null);
|
|
|
|
SpringLayout sl_panel_1 = new SpringLayout();
|
|
|
|
panel_1.setLayout(sl_panel_1);
|
|
|
|
|
|
|
|
JComboBox comboBox_1 = new JComboBox();
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, comboBox_1, 10, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.SOUTH, comboBox_1, 30, SpringLayout.NORTH, panel_1);
|
|
|
|
panel_1.add(comboBox_1);
|
|
|
|
|
|
|
|
JComboBox comboBox_2 = new JComboBox();
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, comboBox_2, 6, SpringLayout.SOUTH, comboBox_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.SOUTH, comboBox_2, 26, SpringLayout.SOUTH, comboBox_1);
|
|
|
|
comboBox_2.setEditable(true);
|
|
|
|
panel_1.add(comboBox_2);
|
|
|
|
|
|
|
|
JButton btnKick = new JButton("Kick");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, btnKick, 9, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, btnKick, 6, SpringLayout.EAST, comboBox_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.SOUTH, btnKick, 32, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, btnKick, 84, SpringLayout.EAST, comboBox_1);
|
|
|
|
panel_1.add(btnKick);
|
|
|
|
|
|
|
|
JButton btnBan = new JButton("Ban");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, btnBan, 35, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, btnBan, 6, SpringLayout.EAST, comboBox_2);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, btnBan, 84, SpringLayout.EAST, comboBox_2);
|
|
|
|
panel_1.add(btnBan);
|
|
|
|
|
|
|
|
JButton btnOp = new JButton("OP");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, btnOp, 9, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, btnOp, 287, SpringLayout.WEST, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.SOUTH, btnOp, 32, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, btnOp, 370, SpringLayout.WEST, panel_1);
|
|
|
|
panel_1.add(btnOp);
|
|
|
|
|
|
|
|
JButton btnDeop = new JButton("DEOP");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, btnDeop, 287, SpringLayout.WEST, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, btnDeop, 35, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, btnDeop, 370, SpringLayout.WEST, panel_1);
|
|
|
|
panel_1.add(btnDeop);
|
|
|
|
|
|
|
|
JLabel lblTargetServer = new JLabel("Target server");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, comboBox_1, 6, SpringLayout.EAST, lblTargetServer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, comboBox_1, 121, SpringLayout.EAST, lblTargetServer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, lblTargetServer, 10, SpringLayout.NORTH, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, lblTargetServer, 10, SpringLayout.WEST, panel_1);
|
|
|
|
panel_1.add(lblTargetServer);
|
|
|
|
|
|
|
|
JLabel lblTargetPlayer = new JLabel("Target player");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, comboBox_2, 7, SpringLayout.EAST, lblTargetPlayer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, comboBox_2, 122, SpringLayout.EAST, lblTargetPlayer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, lblTargetPlayer, 12, SpringLayout.SOUTH, lblTargetServer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, lblTargetPlayer, 0, SpringLayout.WEST, lblTargetServer);
|
|
|
|
panel_1.add(lblTargetPlayer);
|
|
|
|
|
|
|
|
JButton btnCustomCommand = new JButton("Custom command");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, btnCustomCommand, 250, SpringLayout.WEST, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, btnCustomCommand, 0, SpringLayout.EAST, btnOp);
|
|
|
|
panel_1.add(btnCustomCommand);
|
|
|
|
|
|
|
|
JTextField textField = new JTextField();
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, textField, 10, SpringLayout.WEST, panel_1);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, textField, -6, SpringLayout.WEST, btnCustomCommand);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, btnCustomCommand, -1, SpringLayout.NORTH, textField);
|
|
|
|
panel_1.add(textField);
|
|
|
|
textField.setColumns(10);
|
|
|
|
|
|
|
|
JButton button_2 = new JButton("Save server");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, textField, 6, SpringLayout.SOUTH, button_2);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, button_2, 6, SpringLayout.SOUTH, btnBan);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, button_2, 0, SpringLayout.WEST, btnKick);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, button_2, 91, SpringLayout.WEST, btnKick);
|
|
|
|
panel_1.add(button_2);
|
|
|
|
|
|
|
|
JButton button_5 = new JButton("Reload");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, button_5, 6, SpringLayout.SOUTH, btnDeop);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, button_5, 10, SpringLayout.WEST, btnDeop);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, button_5, 0, SpringLayout.EAST, btnOp);
|
|
|
|
panel_1.add(button_5);
|
|
|
|
|
|
|
|
JButton button_6 = new JButton("View server consoles");
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.NORTH, button_6, 0, SpringLayout.NORTH, button_2);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.WEST, button_6, 0, SpringLayout.WEST, lblTargetServer);
|
|
|
|
sl_panel_1.putConstraint(SpringLayout.EAST, button_6, 0, SpringLayout.EAST, comboBox_1);
|
|
|
|
panel_1.add(button_6);
|
|
|
|
|
|
|
|
JPanel panel_2 = new JPanel();
|
|
|
|
tabbedPane.addTab("Servers", null, panel_2, null);
|
|
|
|
SpringLayout sl_panel_2 = new SpringLayout();
|
|
|
|
panel_2.setLayout(sl_panel_2);
|
|
|
|
|
|
|
|
JTabbedPane tabbedPane_1 = new JTabbedPane(JTabbedPane.TOP);
|
|
|
|
sl_panel_2.putConstraint(SpringLayout.NORTH, tabbedPane_1, 0, SpringLayout.NORTH, panel_2);
|
|
|
|
sl_panel_2.putConstraint(SpringLayout.WEST, tabbedPane_1, 0, SpringLayout.WEST, panel_2);
|
|
|
|
sl_panel_2.putConstraint(SpringLayout.SOUTH, tabbedPane_1, 150, SpringLayout.NORTH, panel_2);
|
|
|
|
sl_panel_2.putConstraint(SpringLayout.EAST, tabbedPane_1, 396, SpringLayout.WEST, panel_2);
|
|
|
|
panel_2.add(tabbedPane_1);
|
|
|
|
|
|
|
|
this.serversPane = tabbedPane_1;
|
2018-01-26 22:17:36 +01:00
|
|
|
}
|
2018-01-27 23:34:02 +01:00
|
|
|
|
|
|
|
public void addServer(String name) {
|
|
|
|
JPanel panel = new JPanel();
|
|
|
|
this.serversPane.addTab(name, null, panel, null);
|
|
|
|
SpringLayout sl_panel_3 = new SpringLayout();
|
|
|
|
panel.setLayout(sl_panel_3);
|
|
|
|
|
|
|
|
JLabel lblServerType = new JLabel("Server type");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, lblServerType, 10, SpringLayout.NORTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, lblServerType, 10, SpringLayout.WEST, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, lblServerType, 30, SpringLayout.NORTH, panel);
|
|
|
|
panel.add(lblServerType);
|
|
|
|
|
|
|
|
JComboBox comboBox_3 = new JComboBox();
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, comboBox_3, 10, SpringLayout.NORTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, comboBox_3, 16, SpringLayout.EAST, lblServerType);
|
|
|
|
panel.add(comboBox_3);
|
|
|
|
|
|
|
|
JLabel lblServerVersion = new JLabel("Server version");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, lblServerVersion, 6, SpringLayout.SOUTH, lblServerType);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, lblServerVersion, 10, SpringLayout.WEST, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, lblServerVersion, 26, SpringLayout.SOUTH, lblServerType);
|
|
|
|
panel.add(lblServerVersion);
|
|
|
|
|
|
|
|
JComboBox comboBox_4 = new JComboBox();
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, comboBox_4, 6, SpringLayout.SOUTH, comboBox_3);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, comboBox_4, 0, SpringLayout.WEST, comboBox_3);
|
|
|
|
panel.add(comboBox_4);
|
|
|
|
|
|
|
|
JLabel lblMaxRam = new JLabel("Max ram");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, comboBox_3, -13, SpringLayout.WEST, lblMaxRam);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, lblMaxRam, 10, SpringLayout.NORTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, lblMaxRam, -92, SpringLayout.SOUTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, lblMaxRam, -111, SpringLayout.EAST, panel);
|
|
|
|
panel.add(lblMaxRam);
|
|
|
|
|
|
|
|
JComboBox comboBox_5 = new JComboBox();
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, comboBox_5, 10, SpringLayout.NORTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, comboBox_5, 6, SpringLayout.EAST, lblMaxRam);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, comboBox_5, 86, SpringLayout.EAST, lblMaxRam);
|
|
|
|
panel.add(comboBox_5);
|
|
|
|
|
|
|
|
JCheckBox chckbxEnabled = new JCheckBox("Enabled");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, chckbxEnabled, 6, SpringLayout.SOUTH, lblServerVersion);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, chckbxEnabled, 0, SpringLayout.EAST, lblServerType);
|
|
|
|
panel.add(chckbxEnabled);
|
|
|
|
|
|
|
|
JButton btnRemoveServer = new JButton("Remove server");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, btnRemoveServer, 5, SpringLayout.SOUTH, lblMaxRam);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, btnRemoveServer, -64, SpringLayout.SOUTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, comboBox_5, -5, SpringLayout.NORTH, btnRemoveServer);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, comboBox_4, -13, SpringLayout.WEST, btnRemoveServer);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, btnRemoveServer, 239, SpringLayout.WEST, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, btnRemoveServer, 0, SpringLayout.EAST, comboBox_5);
|
|
|
|
panel.add(btnRemoveServer);
|
|
|
|
|
|
|
|
JLabel lblDirectory = new JLabel("Directory");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, lblDirectory, 1, SpringLayout.NORTH, chckbxEnabled);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, lblDirectory, 0, SpringLayout.SOUTH, chckbxEnabled);
|
|
|
|
panel.add(lblDirectory);
|
|
|
|
|
|
|
|
JTextField textField_1 = new JTextField();
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, textField_1, 4, SpringLayout.SOUTH, btnRemoveServer);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.SOUTH, textField_1, -37, SpringLayout.SOUTH, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, lblDirectory, -6, SpringLayout.WEST, textField_1);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, textField_1, 130, SpringLayout.WEST, panel);
|
|
|
|
panel.add(textField_1);
|
|
|
|
textField_1.setColumns(10);
|
|
|
|
|
|
|
|
JButton btnBrowse = new JButton("Browse");
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, textField_1, -6, SpringLayout.WEST, btnBrowse);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.NORTH, btnBrowse, 3, SpringLayout.SOUTH, btnRemoveServer);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.WEST, btnBrowse, 293, SpringLayout.WEST, panel);
|
|
|
|
sl_panel_3.putConstraint(SpringLayout.EAST, btnBrowse, 0, SpringLayout.EAST, comboBox_5);
|
|
|
|
panel.add(btnBrowse);
|
2018-01-26 22:17:36 +01:00
|
|
|
}
|
2018-01-26 20:26:16 +01:00
|
|
|
}
|