Browse Source

gameexplorer: added layout for navigation panel

gameexplorer
Tobias Krause 3 years ago
committed by Lorenz Hohmann
parent
commit
5903ad6375
  1. 25
      src/main/java/de/tims/gameexplorer/GameExplorer.java

25
src/main/java/de/tims/gameexplorer/GameExplorer.java

@ -13,6 +13,7 @@ public class GameExplorer {
private JPanel border3; private JPanel border3;
private JPanel border4; private JPanel border4;
private JPanel border5; private JPanel border5;
private JPanel border6;
private JButton fleetstormBtn; private JButton fleetstormBtn;
private JButton fourwinsBtn; private JButton fourwinsBtn;
private JButton tictactoeBtn; private JButton tictactoeBtn;
@ -114,13 +115,33 @@ public class GameExplorer {
private void buildNavigationPanel() { private void buildNavigationPanel() {
navigationPanel = new JPanel(); navigationPanel = new JPanel();
navigationPanel.setLayout(new GridBagLayout());
backBtn = new JButton("< Zurück"); backBtn = new JButton("< Zurück");
chosenGame = new JLabel(); chosenGame = new JLabel();
navigationPanel.add(backBtn);
navigationPanel.add(chosenGame);
border6 = new JPanel();
border6.setOpaque(false);
gbc.weighty = 0.0;
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.0;
gbc.insets = new Insets(5, 20, 5, 0);
navigationPanel.add(backBtn, gbc);
gbc.gridx = 1;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.insets = new Insets(0, 0, 0, 0);
navigationPanel.add(border6, gbc);
gbc.gridx = 2;
gbc.gridy = 0;
gbc.weightx = 0.0;
gbc.insets = new Insets(5, 0, 5, 20);
navigationPanel.add(chosenGame, gbc);
} }
public static void main(String[] args) { public static void main(String[] args) {

Loading…
Cancel
Save