|
@ -7,6 +7,7 @@ public class GameExplorer { |
|
|
|
|
|
|
|
|
private JFrame frame; |
|
|
private JFrame frame; |
|
|
private JPanel explorerPanel; |
|
|
private JPanel explorerPanel; |
|
|
|
|
|
private JPanel navigationPanel; |
|
|
private JPanel border1; |
|
|
private JPanel border1; |
|
|
private JPanel border2; |
|
|
private JPanel border2; |
|
|
private JPanel border3; |
|
|
private JPanel border3; |
|
@ -16,6 +17,8 @@ public class GameExplorer { |
|
|
private JButton fourwinsBtn; |
|
|
private JButton fourwinsBtn; |
|
|
private JButton tictactoeBtn; |
|
|
private JButton tictactoeBtn; |
|
|
private JButton leaderboardBtn; |
|
|
private JButton leaderboardBtn; |
|
|
|
|
|
private JButton backBtn; |
|
|
|
|
|
private JLabel chosenGame; |
|
|
private Dimension minSize; |
|
|
private Dimension minSize; |
|
|
private Dimension btnSize; |
|
|
private Dimension btnSize; |
|
|
private GridBagConstraints gbc; |
|
|
private GridBagConstraints gbc; |
|
@ -27,6 +30,19 @@ public class GameExplorer { |
|
|
btnSize = new Dimension(160, 40); |
|
|
btnSize = new Dimension(160, 40); |
|
|
gbc = new GridBagConstraints(); |
|
|
gbc = new GridBagConstraints(); |
|
|
|
|
|
|
|
|
|
|
|
buildExplorerPanel(); |
|
|
|
|
|
buildNavigationPanel(); |
|
|
|
|
|
|
|
|
|
|
|
frame.add(explorerPanel); |
|
|
|
|
|
|
|
|
|
|
|
frame.setMinimumSize(minSize); |
|
|
|
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
|
|
frame.setSize(640, 480); |
|
|
|
|
|
frame.setResizable(true); |
|
|
|
|
|
frame.setVisible(true); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildExplorerPanel() { |
|
|
explorerPanel = new JPanel(); |
|
|
explorerPanel = new JPanel(); |
|
|
explorerPanel.setLayout(new GridBagLayout()); |
|
|
explorerPanel.setLayout(new GridBagLayout()); |
|
|
|
|
|
|
|
@ -94,14 +110,17 @@ public class GameExplorer { |
|
|
gbc.gridy = 8; |
|
|
gbc.gridy = 8; |
|
|
gbc.weighty = 0.2; |
|
|
gbc.weighty = 0.2; |
|
|
explorerPanel.add(border5, gbc); |
|
|
explorerPanel.add(border5, gbc); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildNavigationPanel() { |
|
|
|
|
|
navigationPanel = new JPanel(); |
|
|
|
|
|
|
|
|
frame.add(explorerPanel); |
|
|
|
|
|
|
|
|
backBtn = new JButton("< Zurück"); |
|
|
|
|
|
|
|
|
frame.setMinimumSize(minSize); |
|
|
|
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
|
|
frame.setSize(640, 480); |
|
|
|
|
|
frame.setResizable(true); |
|
|
|
|
|
frame.setVisible(true); |
|
|
|
|
|
|
|
|
chosenGame = new JLabel(); |
|
|
|
|
|
|
|
|
|
|
|
navigationPanel.add(backBtn); |
|
|
|
|
|
navigationPanel.add(chosenGame); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
public static void main(String[] args) { |
|
|