diff --git a/src/main/java/Gui/StartGameGui.java b/src/main/java/Gui/StartGameGui.java new file mode 100644 index 0000000..65a9019 --- /dev/null +++ b/src/main/java/Gui/StartGameGui.java @@ -0,0 +1,15 @@ +package Gui; + +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + + +public class StartGameGui implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + gui.Panel.setVisible(false); + } + +} diff --git a/src/main/java/Gui/gui.java b/src/main/java/Gui/gui.java index 599fab7..e92cfc4 100644 --- a/src/main/java/Gui/gui.java +++ b/src/main/java/Gui/gui.java @@ -32,6 +32,7 @@ public class gui { public void createButtons() { StartBtn = new JButton("Starte Spiel"); + StartBtn.addActionListener(new StartGameGui()); CloseBtn = new JButton("Schlieen"); CloseBtn.addActionListener(new ActionHandler());