|
|
@ -17,7 +17,7 @@ public class GameGui implements GameGuiInterface { |
|
|
|
|
|
|
|
public static JPanel MainPanel, ButtonPanel, HeadingPanel, WinningPanel, LosingPanel; |
|
|
|
public static JLabel HeadlineLabel, QuestionLabel, WinningLabel, LosingLabel, CurrentQuestionNrLabel, HighScoreLabel; |
|
|
|
public static JButton AnswersBtn1, AnswersBtn2, AnswersBtn3, AnswersBtn4, RestartBtn, RestartBtn1, ClosingBtn; |
|
|
|
public static JButton AnswersBtn1, AnswersBtn2, AnswersBtn3, AnswersBtn4, LosingRestartBtn, WinningRestartBtn, ClosingBtn; |
|
|
|
public static int questionNr = 0; |
|
|
|
public static int currentQuestion = 1; |
|
|
|
public static int highScore = 0; |
|
|
@ -55,7 +55,7 @@ public class GameGui implements GameGuiInterface { |
|
|
|
gbc.ipady = 100; |
|
|
|
gbc.insets = new Insets(20, 0, 0, 0); |
|
|
|
|
|
|
|
RestartBtn = new JButton("Neustarten"); |
|
|
|
LosingRestartBtn = new JButton("Neustarten"); |
|
|
|
ClosingBtn = new JButton("Schliessen"); |
|
|
|
|
|
|
|
LosingPanel = new JPanel(); |
|
|
@ -67,9 +67,9 @@ public class GameGui implements GameGuiInterface { |
|
|
|
LosingLabel.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
|
|
|
|
|
LosingPanel.add(LosingLabel, gbc); |
|
|
|
LosingPanel.add(RestartBtn, gbc); |
|
|
|
LosingPanel.add(LosingRestartBtn, gbc); |
|
|
|
LosingPanel.add(ClosingBtn, gbc); |
|
|
|
RestartBtn.addActionListener(new ActionHandler()); |
|
|
|
LosingRestartBtn.addActionListener(new ActionHandler()); |
|
|
|
ClosingBtn.addActionListener(new ActionHandler()); |
|
|
|
gui.Frame.add(LosingPanel); |
|
|
|
} |
|
|
@ -85,7 +85,7 @@ public class GameGui implements GameGuiInterface { |
|
|
|
gbc.ipady = 100; |
|
|
|
gbc.insets = new Insets(20, 0, 0, 0); |
|
|
|
|
|
|
|
RestartBtn1 = new JButton("Nochmal Spielen"); |
|
|
|
WinningRestartBtn = new JButton("Nochmal Spielen"); |
|
|
|
ClosingBtn = new JButton("Schliessen"); |
|
|
|
|
|
|
|
WinningPanel = new JPanel(); |
|
|
@ -96,9 +96,9 @@ public class GameGui implements GameGuiInterface { |
|
|
|
WinningLabel.setFont(new Font("Serif", Font.BOLD, 34)); |
|
|
|
|
|
|
|
WinningPanel.add(WinningLabel, gbc); |
|
|
|
WinningPanel.add(RestartBtn1, gbc); |
|
|
|
WinningPanel.add(WinningRestartBtn, gbc); |
|
|
|
WinningPanel.add(ClosingBtn, gbc); |
|
|
|
RestartBtn1.addActionListener(new ActionHandler()); |
|
|
|
WinningRestartBtn.addActionListener(new ActionHandler()); |
|
|
|
ClosingBtn.addActionListener(new ActionHandler()); |
|
|
|
gui.Frame.add(WinningPanel); |
|
|
|
} |
|
|
|