|
@ -19,6 +19,7 @@ public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel, LosingP |
|
|
public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel, ShowQuestionNr; |
|
|
public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel, ShowQuestionNr; |
|
|
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn,RestartBtn1,ClosingBtn; |
|
|
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn,RestartBtn1,ClosingBtn; |
|
|
public static int questionNr = 0; |
|
|
public static int questionNr = 0; |
|
|
|
|
|
public static int counter = 1; |
|
|
GridLayout grid; |
|
|
GridLayout grid; |
|
|
GridBagConstraints gbc; |
|
|
GridBagConstraints gbc; |
|
|
|
|
|
|
|
@ -103,9 +104,10 @@ GridBagConstraints gbc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void createShowQuestion() { |
|
|
|
|
|
|
|
|
public void createShowQuestion(int i) { |
|
|
int money[] = {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150}; |
|
|
int money[] = {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150}; |
|
|
String questionText = "Hier wird die Frage stehen"; |
|
|
|
|
|
|
|
|
String questionText = "Frage " + counter + ": " + money[i - 1] + "€"; |
|
|
|
|
|
counter++; |
|
|
|
|
|
|
|
|
ShowQuestionNr.setText(questionText); |
|
|
ShowQuestionNr.setText(questionText); |
|
|
MainPanel.add(ShowQuestionNr); |
|
|
MainPanel.add(ShowQuestionNr); |
|
|