Browse Source

adjusted GridBagLayout for Restart button

master
Ozan-Can Ekinci 2 years ago
parent
commit
26b71db181
  1. 7
      src/main/java/Gui/GameGui.java

7
src/main/java/Gui/GameGui.java

@ -131,10 +131,15 @@ GridBagConstraints gbc;
@Override
public void createRestartButton() {
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.ipadx = 200;
gbc.ipady = 100;
gbc.insets = new Insets(20, 0, 0, 0);
RestartBtn = new JButton("Neustarten");
LosingPanel.add(LosingLabel,gbc);
LosingPanel.add(RestartBtn,gbc);
RestartBtn.addActionListener(new RestartGame());
}
}
Loading…
Cancel
Save