Browse Source

implemented closing button functionality

master
Ozan-Can Ekinci 2 years ago
parent
commit
face475c2f
  1. 5
      src/main/java/Gui/ActionHandler.java
  2. 1
      src/main/java/Gui/GameGui.java

5
src/main/java/Gui/ActionHandler.java

@ -9,6 +9,11 @@ public class ActionHandler implements ActionListener {
if (e.getSource() == gui.CloseBtn) {
System.exit(0);
}
if (e.getSource() == GameGui.ClosingBtn) {
System.exit(0);
}
}
}

1
src/main/java/Gui/GameGui.java

@ -144,5 +144,6 @@ GridBagConstraints gbc;
LosingPanel.add(ClosingBtn,gbc);
RestartBtn.addActionListener(new RestartGame());
ClosingBtn.addActionListener(new ActionHandler());
}
}
Loading…
Cancel
Save