@ -0,0 +1,15 @@
package Gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ActionHandler implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == gui.CloseBtn) {
System.exit(0);
}
@ -33,6 +33,8 @@ public class gui {
public void createButtons() {
StartBtn = new JButton("Starte Spiel");
CloseBtn = new JButton("Schlieen");
CloseBtn.addActionListener(new ActionHandler());
public void createPanel() {
@ -1,5 +1,5 @@
#Generated by Maven
#Fri Dec 30 01:08:26 CET 2022
#Fri Dec 30 01:11:12 CET 2022
groupId=MiniGameProject
artifactId=MiniGameProject
version=1.0-SNAPSHOT
@ -1,2 +1,3 @@
C:\Users\Leon\MiniGameProject\src\main\java\Gui\ActionHandler.java
C:\Users\Leon\MiniGameProject\src\main\java\Gui\gui.java
C:\Users\Leon\MiniGameProject\src\main\java\main.java