diff --git a/src/main/java/Gui/gui.java b/src/main/java/Gui/gui.java index 820fbb0..ed1835f 100644 --- a/src/main/java/Gui/gui.java +++ b/src/main/java/Gui/gui.java @@ -1,11 +1,15 @@ package Gui; +import java.awt.GridBagLayout; + import javax.swing.JButton; import javax.swing.JFrame; +import javax.swing.JPanel; public class gui { JFrame jf; JButton StartBtn, CloseBtn; + JPanel Panel; public static int width = 800, height = 600; @@ -18,10 +22,16 @@ public class gui { 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); + Panel = new JPanel(); + Panel.setSize(width,height); + Panel.setLayout(new GridBagLayout()); + Panel.add(StartBtn); + Panel.add(CloseBtn); + jf.add(Panel); + Panel.setVisible(true); + } }