|
|
@ -10,6 +10,8 @@ import javax.swing.JButton; |
|
|
|
import javax.swing.JLabel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import game.loadNextQuestion; |
|
|
|
|
|
|
|
|
|
|
|
public class GameGui implements GameGuiInterface { |
|
|
|
|
|
|
@ -41,7 +43,7 @@ GridBagConstraints gbc; |
|
|
|
} |
|
|
|
@Override |
|
|
|
public void createHeadline() { |
|
|
|
Headline = new JLabel("Wer wird Millionär?"); |
|
|
|
Headline = new JLabel("Wer wird Million�r?"); |
|
|
|
headingPanel.add(Headline); |
|
|
|
MainPanel.add(headingPanel); |
|
|
|
Headline.setHorizontalAlignment(JLabel.CENTER); |
|
|
@ -71,16 +73,19 @@ GridBagConstraints gbc; |
|
|
|
AnswersBtn1 = new JButton(); |
|
|
|
gbc.gridx = 0; |
|
|
|
gbc.gridy = 0; |
|
|
|
AnswersBtn1.addActionListener(new loadNextQuestion()); |
|
|
|
ButtonPanel.add(AnswersBtn1,gbc); |
|
|
|
|
|
|
|
|
|
|
|
gbc.gridx = 1; |
|
|
|
gbc.gridy = 0; |
|
|
|
AnswersBtn2 = new JButton(); |
|
|
|
AnswersBtn2.addActionListener(new loadNextQuestion()); |
|
|
|
ButtonPanel.add(AnswersBtn2,gbc); |
|
|
|
|
|
|
|
gbc.gridx = 0; |
|
|
|
gbc.gridy = 1; |
|
|
|
AnswersBtn3 = new JButton(); |
|
|
|
AnswersBtn3.addActionListener(new loadNextQuestion()); |
|
|
|
ButtonPanel.add(AnswersBtn3,gbc); |
|
|
|
|
|
|
|
gbc.gridx = 1; |
|
|
@ -88,6 +93,7 @@ GridBagConstraints gbc; |
|
|
|
AnswersBtn4 = new JButton(); |
|
|
|
ButtonPanel.add(AnswersBtn4,gbc); |
|
|
|
ButtonPanel.setVisible(true); |
|
|
|
AnswersBtn4.addActionListener(new loadNextQuestion()); |
|
|
|
MainPanel.add(ButtonPanel); |
|
|
|
} |
|
|
|
} |
xxxxxxxxxx