From 12463e6375c8adf6a0af1ba3e8a62aa5eb7200ac Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Tue, 31 Jan 2023 16:06:24 +0100 Subject: [PATCH] Update --- src/main/java/MenuFrame.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/MenuFrame.java b/src/main/java/MenuFrame.java index 660b68e..1321527 100644 --- a/src/main/java/MenuFrame.java +++ b/src/main/java/MenuFrame.java @@ -9,4 +9,12 @@ public class MenuFrame extends JFrame { this.add(panel); this.setTitle("Main Menu for Ping-Pong"); this.setResizable(false); + + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.pack(); + this.setVisible(true); + this.setLocationRelativeTo(null); + } + + }