void () { UnscrambleSupport unscrambleSupport = (UnscrambleSupport)myUnscrambleChooser.getSelectedItem(); JComponent settingsComponent = unscrambleSupport == null ? null : unscrambleSupport.createSettingsComponent(); mySettingsPanel.removeAll(); if (settingsComponent != null) { mySettingsPanel.add(settingsComponent, BorderLayout.CENTER); } myUnscramblePanel.validate(); }