|
@ -15,8 +15,8 @@ import game.loadNextQuestion; |
|
|
|
|
|
|
|
|
public class GameGui implements GameGuiInterface { |
|
|
public class GameGui implements GameGuiInterface { |
|
|
|
|
|
|
|
|
public static JPanel MainPanel, ButtonPanel, headingPanel; |
|
|
|
|
|
public static JLabel Headline,QuestionLabel; |
|
|
|
|
|
|
|
|
public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel; |
|
|
|
|
|
public static JLabel Headline,QuestionLabel,WinningLabel; |
|
|
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4; |
|
|
public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4; |
|
|
public static int questionNr = 0; |
|
|
public static int questionNr = 0; |
|
|
GridLayout grid; |
|
|
GridLayout grid; |
|
@ -41,6 +41,17 @@ GridBagConstraints gbc; |
|
|
headingPanel.setLayout(grid); |
|
|
headingPanel.setLayout(grid); |
|
|
gui.Frame.add(MainPanel); |
|
|
gui.Frame.add(MainPanel); |
|
|
} |
|
|
} |
|
|
|
|
|
@Override |
|
|
|
|
|
public void createWinningPanel() { |
|
|
|
|
|
GameGui.MainPanel.setVisible(false); |
|
|
|
|
|
GameGui.ButtonPanel.setVisible(false); |
|
|
|
|
|
WinningPanel = new JPanel(); |
|
|
|
|
|
WinningLabel = new JLabel("Du hast Gewonnen!"); |
|
|
|
|
|
WinningPanel.add(WinningLabel); |
|
|
|
|
|
gui.Frame.add(WinningPanel); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void createHeadline() { |
|
|
public void createHeadline() { |
|
|
Headline = new JLabel("Wer wird Millionär?"); |
|
|
Headline = new JLabel("Wer wird Millionär?"); |
|
|