Browse Source

Added Start and Close Button

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

9
src/main/java/Gui/gui.java

@ -1,9 +1,11 @@
package Gui;
import javax.swing.JButton;
import javax.swing.JFrame;
public class gui {
JFrame jf;
JButton StartBtn, CloseBtn;
public static int width = 800, height = 600;
@ -14,7 +16,12 @@ public class gui {
jf.setLocationRelativeTo(null);
jf.setResizable(false);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
StartBtn = new JButton("Starte Spiel");
StartBtn.setSize(300,100);
jf.add(StartBtn);
CloseBtn = new JButton("Schlieen");
CloseBtn.setSize(300,100);
jf.add(CloseBtn);
}
}

BIN
target/MiniGameProject-1.0-SNAPSHOT.jar

2
target/maven-archiver/pom.properties

@ -1,5 +1,5 @@
#Generated by Maven
#Fri Dec 30 00:46:17 CET 2022
#Fri Dec 30 00:53:10 CET 2022
groupId=MiniGameProject
artifactId=MiniGameProject
version=1.0-SNAPSHOT
Loading…
Cancel
Save