From 4f46b41e2410335adcb841130a8d7b6507aa4bbe Mon Sep 17 00:00:00 2001 From: Ozan-Can Ekinci Date: Fri, 13 Jan 2023 15:41:32 +0100 Subject: [PATCH] created new JLabel and method for current question --- src/main/java/Gui/GameGui.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 31e6e4a..8a2f70d 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -16,7 +16,7 @@ import game.loadNextQuestion; public class GameGui implements GameGuiInterface { public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel, LosingPanel; -public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel; +public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel, ShowQuestionNr; public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn,RestartBtn1,ClosingBtn; public static int questionNr = 0; GridLayout grid; @@ -101,6 +101,14 @@ GridBagConstraints gbc; ClosingBtn.addActionListener(new ActionHandler()); gui.Frame.add(WinningPanel); } + + 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"; + + ShowQuestionNr.setText(questionText); + MainPanel.add(ShowQuestionNr); + } @Override public void createHeadline() {