Browse Source

add minimum width and height for buttons

master
Leon Montag 2 years ago
parent
commit
3f3a9ec2eb
  1. 6
      .classpath
  2. 3
      src/main/java/Gui/GameGui.java
  3. 2
      src/main/java/Gui/StartGameGui.java

6
.classpath

@ -19,6 +19,10 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

3
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;
}
}

2
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();
}

Loading…
Cancel
Save