Browse Source

Added a GridBagConstraints

master
Leon Montag 2 years ago
parent
commit
a571484f77
  1. 4
      src/main/java/Gui/gui.java
  2. BIN
      target/MiniGameProject-1.0-SNAPSHOT.jar
  3. 2
      target/maven-archiver/pom.properties

4
src/main/java/Gui/gui.java

@ -1,6 +1,7 @@
package Gui; package Gui;
import java.awt.Font; import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout; import java.awt.GridBagLayout;
import javax.swing.JButton; import javax.swing.JButton;
@ -30,6 +31,9 @@ public class gui {
Panel = new JPanel(); Panel = new JPanel();
Panel.setSize(width,height); Panel.setSize(width,height);
Panel.setLayout(new GridBagLayout()); Panel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.fill = GridBagConstraints.HORIZONTAL;
Label = new JLabel("MiniGames"); Label = new JLabel("MiniGames");
Label.setHorizontalAlignment(JLabel.CENTER); Label.setHorizontalAlignment(JLabel.CENTER);
Label.setFont(new Font("Serif", Font.BOLD, 28)); Label.setFont(new Font("Serif", Font.BOLD, 28));

BIN
target/MiniGameProject-1.0-SNAPSHOT.jar

2
target/maven-archiver/pom.properties

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Fri Dec 30 00:56:52 CET 2022
#Fri Dec 30 00:59:01 CET 2022
groupId=MiniGameProject groupId=MiniGameProject
artifactId=MiniGameProject artifactId=MiniGameProject
version=1.0-SNAPSHOT version=1.0-SNAPSHOT
Loading…
Cancel
Save