From fdd09f49f6f79a5ea287a9d6896f5c4e5e26454e Mon Sep 17 00:00:00 2001 From: HerrGalgen Date: Thu, 28 Apr 2022 12:20:33 +0200 Subject: [PATCH] first finish --- src/Panels/Settings.java | 7 ++++++- src/Summaries/GameMain.java | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Panels/Settings.java b/src/Panels/Settings.java index 73e1cc6..bf4d5be 100644 --- a/src/Panels/Settings.java +++ b/src/Panels/Settings.java @@ -9,6 +9,7 @@ import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.io.IOException; import java.util.Properties; public class Settings extends JFrame { @@ -58,7 +59,11 @@ public void windowClosing(WindowEvent e) { gameSummary.setSettingsOpen(false); if (cbrestart.isSelected()) { gameSummary.dispose(); - GameMain.main(new String[2]); + try { + GameMain.main(new String[0]); + } catch (IOException ex) { + ex.printStackTrace(); + } } } }); diff --git a/src/Summaries/GameMain.java b/src/Summaries/GameMain.java index 608bb7a..272343d 100644 --- a/src/Summaries/GameMain.java +++ b/src/Summaries/GameMain.java @@ -1,8 +1,11 @@ package Summaries; +import java.io.IOException; + public class GameMain { - public static void main( String[] args ) { + public static void main( String[] args ) throws IOException { + GameSummary game = new GameSummary(); game.init(); }