From b8ca7f2292a2339043613792c3c224a1c53c42ce Mon Sep 17 00:00:00 2001 From: Ozan-Can Ekinci Date: Sun, 15 Jan 2023 21:38:12 +0100 Subject: [PATCH] refactoring: removed unnecessary panel visibility and adjusted WinningLabel size --- src/main/java/Gui/GameGui.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 54dde92..145d796 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -47,7 +47,6 @@ public class GameGui implements GameGuiInterface { @Override public void createLosingPanel() { MainPanel.setVisible(false); - ButtonPanel.setVisible(false); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridwidth = GridBagConstraints.REMAINDER; @@ -77,8 +76,7 @@ public class GameGui implements GameGuiInterface { @Override public void createWinningPanel() { - GameGui.MainPanel.setVisible(false); - GameGui.ButtonPanel.setVisible(false); + MainPanel.setVisible(false); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridwidth = GridBagConstraints.REMAINDER; @@ -95,7 +93,7 @@ public class GameGui implements GameGuiInterface { WinningLabel = new JLabel("Du hast Gewonnen"); WinningLabel.setVerticalAlignment(JLabel.CENTER); WinningLabel.setHorizontalAlignment(JLabel.CENTER); - WinningLabel.setFont(new Font("Serif", Font.BOLD, 28)); + WinningLabel.setFont(new Font("Serif", Font.BOLD, 34)); WinningPanel.add(WinningLabel, gbc); WinningPanel.add(RestartBtn1, gbc);