summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jrummikub/view/impl/SettingsPanel.java3
1 files changed, 3 insertions, 0 deletions
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<PlayerSettingsPanel> playerSettingsPanels = new ArrayList<PlayerSettingsPanel>();
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);
}