Browse Source

refactoring: removed unnecessary panel visibility and adjusted WinningLabel size

master
Ozan-Can Ekinci 2 years ago
parent
commit
b8ca7f2292
  1. 6
      src/main/java/Gui/GameGui.java

6
src/main/java/Gui/GameGui.java

@ -47,7 +47,6 @@ public class GameGui implements GameGuiInterface {
@Override @Override
public void createLosingPanel() { public void createLosingPanel() {
MainPanel.setVisible(false); MainPanel.setVisible(false);
ButtonPanel.setVisible(false);
GridBagConstraints gbc = new GridBagConstraints(); GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.gridwidth = GridBagConstraints.REMAINDER;
@ -77,8 +76,7 @@ public class GameGui implements GameGuiInterface {
@Override @Override
public void createWinningPanel() { public void createWinningPanel() {
GameGui.MainPanel.setVisible(false);
GameGui.ButtonPanel.setVisible(false);
MainPanel.setVisible(false);
GridBagConstraints gbc = new GridBagConstraints(); GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.gridwidth = GridBagConstraints.REMAINDER;
@ -95,7 +93,7 @@ public class GameGui implements GameGuiInterface {
WinningLabel = new JLabel("Du hast Gewonnen"); WinningLabel = new JLabel("Du hast Gewonnen");
WinningLabel.setVerticalAlignment(JLabel.CENTER); WinningLabel.setVerticalAlignment(JLabel.CENTER);
WinningLabel.setHorizontalAlignment(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(WinningLabel, gbc);
WinningPanel.add(RestartBtn1, gbc); WinningPanel.add(RestartBtn1, gbc);

Loading…
Cancel
Save