diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 8a2f70d..2d4af82 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -102,6 +102,7 @@ GridBagConstraints gbc; gui.Frame.add(WinningPanel); } + @Override public void createShowQuestion() { int money[] = {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150}; String questionText = "Hier wird die Frage stehen"; @@ -114,6 +115,7 @@ GridBagConstraints gbc; public void createHeadline() { Headline = new JLabel("Wer wird Millionaer?"); headingPanel.add(Headline); + ShowQuestionNr = new JLabel(); MainPanel.add(headingPanel); Headline.setHorizontalAlignment(JLabel.CENTER); Headline.setFont(new Font("Serif", Font.BOLD, 28)); diff --git a/src/main/java/Gui/GameGuiInterface.java b/src/main/java/Gui/GameGuiInterface.java index 78d9657..c1fe85a 100644 --- a/src/main/java/Gui/GameGuiInterface.java +++ b/src/main/java/Gui/GameGuiInterface.java @@ -18,4 +18,6 @@ public interface GameGuiInterface { void createButtons(); + void createShowQuestion(); + } \ No newline at end of file diff --git a/src/main/java/Gui/StartGameGui.java b/src/main/java/Gui/StartGameGui.java index 666925d..d811ace 100644 --- a/src/main/java/Gui/StartGameGui.java +++ b/src/main/java/Gui/StartGameGui.java @@ -19,5 +19,6 @@ public class StartGameGui implements ActionListener { runGame rungame = new runGame(); rungame.run(GameGui.questionNr); + Gui.createShowQuestion(); } } diff --git a/src/main/java/game/loadNextQuestion.java b/src/main/java/game/loadNextQuestion.java index 1a2fa7f..a712fe9 100644 --- a/src/main/java/game/loadNextQuestion.java +++ b/src/main/java/game/loadNextQuestion.java @@ -52,6 +52,7 @@ public class loadNextQuestion implements ActionListener { public void loadQuestions() { if (GameGui.questionNr != runGame.arrQuestions.length - 1) { StartGame.run(GameGui.questionNr); + gameStatus.createShowQuestion(); } else { gameStatus.createWinningPanel(); }