Browse Source

Add GridLayout to headingPanel

master
Leon Montag 2 years ago
parent
commit
fa789f2d1f
  1. 8
      src/main/java/Gui/GameGui.java
  2. 1
      src/main/java/Gui/StartGameGui.java
  3. BIN
      target/MiniGameProject-1.0-SNAPSHOT.jar
  4. 2
      target/maven-archiver/pom.properties
  5. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

8
src/main/java/Gui/GameGui.java

@ -1,14 +1,22 @@
package Gui;
import java.awt.GridLayout;
import javax.swing.JPanel;
public class GameGui {
public static JPanel MainPanel, ButtonPanel, headingPanel;
GridLayout grid;
public void createGui() {
MainPanel = new JPanel();
ButtonPanel = new JPanel();
headingPanel = new JPanel();
grid = new GridLayout(2,1);
grid.setVgap(150);
headingPanel.setLayout(grid);
gui.Frame.add(MainPanel);
}
}

1
src/main/java/Gui/StartGameGui.java

@ -13,6 +13,7 @@ public class StartGameGui implements ActionListener {
public void actionPerformed(ActionEvent e) {
gui.Panel.setVisible(false);
GameGui Gui = new GameGui();
Gui.createGui();
runGame rungame = new runGame();
rungame.run();
}

BIN
target/MiniGameProject-1.0-SNAPSHOT.jar

2
target/maven-archiver/pom.properties

@ -1,5 +1,5 @@
#Generated by Maven
#Fri Dec 30 12:56:18 CET 2022
#Fri Dec 30 13:40:39 CET 2022
groupId=MiniGameProject
artifactId=MiniGameProject
version=1.0-SNAPSHOT

1
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@ -3,3 +3,4 @@ C:\Users\Leon\MiniGameProject\src\main\java\Gui\gui.java
C:\Users\Leon\MiniGameProject\src\main\java\game\runGame.java
C:\Users\Leon\MiniGameProject\src\main\java\main.java
C:\Users\Leon\MiniGameProject\src\main\java\Gui\StartGameGui.java
C:\Users\Leon\MiniGameProject\src\main\java\Gui\GameGui.java
Loading…
Cancel
Save