Browse Source

created closing game button

master
Ozan-Can Ekinci 2 years ago
parent
commit
2ad57fc5a9
  1. 5
      src/main/java/Gui/GameGui.java

5
src/main/java/Gui/GameGui.java

@ -17,7 +17,7 @@ public class GameGui implements GameGuiInterface {
public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel, LosingPanel; public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel, LosingPanel;
public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel; public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel;
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn;
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn,ClosingBtn;
public static int questionNr = 0; public static int questionNr = 0;
GridLayout grid; GridLayout grid;
GridBagConstraints gbc; GridBagConstraints gbc;
@ -137,9 +137,12 @@ GridBagConstraints gbc;
gbc.ipady = 100; gbc.ipady = 100;
gbc.insets = new Insets(20, 0, 0, 0); gbc.insets = new Insets(20, 0, 0, 0);
RestartBtn = new JButton("Neustarten"); RestartBtn = new JButton("Neustarten");
ClosingBtn = new JButton("Schliessen");
LosingPanel.add(LosingLabel,gbc); LosingPanel.add(LosingLabel,gbc);
LosingPanel.add(RestartBtn,gbc); LosingPanel.add(RestartBtn,gbc);
LosingPanel.add(ClosingBtn,gbc);
RestartBtn.addActionListener(new RestartGame()); RestartBtn.addActionListener(new RestartGame());
} }
} }
Loading…
Cancel
Save