From ba50d3fea488fd70a9c8617c7c2c24df2af16c57 Mon Sep 17 00:00:00 2001 From: Leon Montag Date: Fri, 30 Dec 2022 15:03:06 +0100 Subject: [PATCH] Added GridBagConstraints and GridBagLayout --- src/main/java/Gui/GameGui.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 07f56fc..61161f0 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -1,6 +1,8 @@ package Gui; import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.GridLayout; import javax.swing.JLabel; @@ -11,6 +13,7 @@ public class GameGui { public static JPanel MainPanel, ButtonPanel, headingPanel; public static JLabel Headline,QuestionLabel; GridLayout grid; +GridBagConstraints gbc; public void createGui() { @@ -31,5 +34,8 @@ GridLayout grid; QuestionLabel.setHorizontalAlignment(JLabel.CENTER); QuestionLabel.setVerticalAlignment(JLabel.NORTH); headingPanel.add(QuestionLabel); + ButtonPanel.setLayout(new GridBagLayout()); + gbc = new GridBagConstraints(); + } }