diff --git a/src/main/java/Gui/gui.java b/src/main/java/Gui/gui.java index 688597c..ef552d6 100644 --- a/src/main/java/Gui/gui.java +++ b/src/main/java/Gui/gui.java @@ -11,24 +11,31 @@ import javax.swing.JLabel; import javax.swing.JPanel; public class gui { - JFrame jf; - JButton StartBtn, CloseBtn; - JPanel Panel; - JLabel Label; - - - public static int width = 800, height = 600; - - public void create(){ + public static JFrame jf; + public static JButton StartBtn, CloseBtn; + public static JPanel Panel; + public static JLabel Label; + public static int width = 800, height = 600; + + public void StartMainMenu() { + createFrame(); + createButtons(); + createPanel(); + } + public void createFrame(){ jf = new JFrame("Wer wird Millionr"); jf.setSize(width,height); jf.setLocationRelativeTo(null); jf.setResizable(false); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + public void createButtons() { StartBtn = new JButton("Starte Spiel"); - StartBtn.setSize(300,100); CloseBtn = new JButton("Schlieen"); - CloseBtn.setSize(300,100); + + } + public void createPanel() { Panel = new JPanel(); Panel.setSize(width,height); Panel.setLayout(new GridBagLayout()); @@ -47,8 +54,7 @@ public class gui { jf.add(Panel); jf.setVisible(true); Panel.setVisible(true); - + } - } } diff --git a/src/main/java/main.java b/src/main/java/main.java index 4a9afbb..7c295f9 100644 --- a/src/main/java/main.java +++ b/src/main/java/main.java @@ -6,7 +6,8 @@ public class main { public static void main(String[] args) { // TODO Auto-generated method stub gui Mainmenu = new gui(); - Mainmenu.create(); + Mainmenu.StartMainMenu(); } } + diff --git a/target/MiniGameProject-1.0-SNAPSHOT.jar b/target/MiniGameProject-1.0-SNAPSHOT.jar index a4420df..2fc7773 100644 Binary files a/target/MiniGameProject-1.0-SNAPSHOT.jar and b/target/MiniGameProject-1.0-SNAPSHOT.jar differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties index 1de26ae..87176fe 100644 --- a/target/maven-archiver/pom.properties +++ b/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Fri Dec 30 01:03:37 CET 2022 +#Fri Dec 30 01:04:49 CET 2022 groupId=MiniGameProject artifactId=MiniGameProject version=1.0-SNAPSHOT