From bcfe22ef64f1e01e6114a76b00dcb4787b6a8b84 Mon Sep 17 00:00:00 2001 From: Leon Montag Date: Fri, 30 Dec 2022 15:27:26 +0100 Subject: [PATCH] added AnswerBtn1 and AnswerBtn2 --- src/main/java/Gui/GameGui.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 13c666f..e82af2f 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -6,12 +6,15 @@ import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Insets; +import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; + public class GameGui { - + public static JPanel MainPanel, ButtonPanel, headingPanel; public static JLabel Headline,QuestionLabel; +public static JButton AnswersBtn1,AnswersBtn2; GridLayout grid; GridBagConstraints gbc; @@ -42,5 +45,19 @@ GridBagConstraints gbc; gbc.ipadx = 300; gbc.ipady = 100; + AnswersBtn1 = new JButton(); + gbc.gridx = 0; + gbc.gridy = 0; + ButtonPanel.add(AnswersBtn1,gbc); + + gbc.gridx = 1; + gbc.gridy = 0; + AnswersBtn2 = new JButton(); + ButtonPanel.add(AnswersBtn2,gbc); + + + ButtonPanel.setVisible(true); + MainPanel.add(ButtonPanel); + } }