From 3f3a9ec2eb11fa98f06ce41ed30ca28c05b9132f Mon Sep 17 00:00:00 2001 From: Leon Montag Date: Fri, 30 Dec 2022 15:19:46 +0100 Subject: [PATCH] add minimum width and height for buttons --- .classpath | 6 +++++- src/main/java/Gui/GameGui.java | 3 ++- src/main/java/Gui/StartGameGui.java | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.classpath b/.classpath index 2b8975f..a3cc68f 100644 --- a/.classpath +++ b/.classpath @@ -19,6 +19,10 @@ - + + + + + diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index a7b3427..13c666f 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -8,7 +8,6 @@ import java.awt.Insets; import javax.swing.JLabel; import javax.swing.JPanel; - public class GameGui { public static JPanel MainPanel, ButtonPanel, headingPanel; @@ -40,6 +39,8 @@ GridBagConstraints gbc; gbc.gridwidth = 1; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(10,10,10,10); + gbc.ipadx = 300; + gbc.ipady = 100; } } diff --git a/src/main/java/Gui/StartGameGui.java b/src/main/java/Gui/StartGameGui.java index cafc2ea..b964c53 100644 --- a/src/main/java/Gui/StartGameGui.java +++ b/src/main/java/Gui/StartGameGui.java @@ -1,6 +1,5 @@ package Gui; -import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -14,6 +13,7 @@ public class StartGameGui implements ActionListener { gui.Panel.setVisible(false); GameGui Gui = new GameGui(); Gui.createGui(); + runGame rungame = new runGame(); rungame.run(); }