|
|
@ -8,6 +8,7 @@ public class GameExplorer { |
|
|
|
|
|
|
|
private JFrame frame; |
|
|
|
private JPanel explorerPanel; |
|
|
|
private JPanel loginPanel; |
|
|
|
private JPanel gamePanel; |
|
|
|
private JPanel navigationPanel; |
|
|
|
private JPanel fleetstormPanel; |
|
|
@ -20,12 +21,15 @@ public class GameExplorer { |
|
|
|
private JPanel border4; |
|
|
|
private JPanel border5; |
|
|
|
private JPanel border6; |
|
|
|
private JButton loginBtn; |
|
|
|
private JButton fleetstormBtn; |
|
|
|
private JButton fourwinsBtn; |
|
|
|
private JButton tictactoeBtn; |
|
|
|
private JButton leaderboardBtn; |
|
|
|
private JButton backBtn; |
|
|
|
private JLabel username; |
|
|
|
private JLabel chosenGame; |
|
|
|
private JTextField usernameInput; |
|
|
|
private Dimension minSize; |
|
|
|
private Dimension btnSize; |
|
|
|
private GridBagConstraints gbc; |
|
|
@ -41,10 +45,11 @@ public class GameExplorer { |
|
|
|
gbc = new GridBagConstraints(); |
|
|
|
|
|
|
|
buildExplorerPanel(); |
|
|
|
buildLoginPanel(); |
|
|
|
buildNavigationPanel(); |
|
|
|
buildGamePanels(); |
|
|
|
|
|
|
|
frame.add(explorerPanel); |
|
|
|
frame.add(loginPanel); |
|
|
|
|
|
|
|
frame.setMinimumSize(minSize); |
|
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
@ -127,6 +132,18 @@ public class GameExplorer { |
|
|
|
explorerPanel.add(border5, gbc); |
|
|
|
} |
|
|
|
|
|
|
|
private void buildLoginPanel() { |
|
|
|
loginPanel = new JPanel(); |
|
|
|
|
|
|
|
loginBtn = new JButton("Login"); |
|
|
|
username = new JLabel("Name eingeben:"); |
|
|
|
usernameInput = new JTextField(10); |
|
|
|
|
|
|
|
loginPanel.add(username); |
|
|
|
loginPanel.add(usernameInput); |
|
|
|
loginPanel.add(loginBtn); |
|
|
|
} |
|
|
|
|
|
|
|
private void buildNavigationPanel() { |
|
|
|
navigationPanel = new JPanel(); |
|
|
|
navigationPanel.setLayout(new GridBagLayout()); |
|
|
|