|
|
@ -15,8 +15,8 @@ import game.loadNextQuestion; |
|
|
|
|
|
|
|
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 int questionNr = 0; |
|
|
|
GridLayout grid; |
|
|
@ -41,6 +41,17 @@ GridBagConstraints gbc; |
|
|
|
headingPanel.setLayout(grid); |
|
|
|
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 |
|
|
|
public void createHeadline() { |
|
|
|
Headline = new JLabel("Wer wird Millionär?"); |
|
|
|