From ffbfc751c95b483f72bbb9ff47e4f04eef2c83cb Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 28 May 2011 21:11:35 +0200 Subject: Set initial enable state of the player remove buttons correctly git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@293 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/SettingsPanel.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java index a5ad8a3..e96b19d 100644 --- a/src/jrummikub/view/impl/SettingsPanel.java +++ b/src/jrummikub/view/impl/SettingsPanel.java @@ -49,6 +49,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { private JLabel errorMessageLabel; private JButton startButton; + private boolean removeButtonsEnabled = true; private List playerSettingsPanels = new ArrayList(); private Event startGameEvent = new Event(); @@ -116,6 +117,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { @Override public void enableRemovePlayerButtons(boolean enable) { + removeButtonsEnabled = enable; for (PlayerSettingsPanel psp : playerSettingsPanels) { psp.enableRemoveButton(enable); } @@ -286,6 +288,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { remove(); } }); + removeButton.setEnabled(removeButtonsEnabled); add(removeButton, BorderLayout.EAST); } -- cgit v1.2.3