Browse Source

created new JLabel and method for current question

master
Ozan-Can Ekinci 2 years ago
parent
commit
4f46b41e24
  1. 10
      src/main/java/Gui/GameGui.java

10
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() {

Loading…
Cancel
Save