@Override public void stateChanged(ChangeEvent event) { boolean selected = myKeyboardPanel.mySecondStrokeEnable.isSelected(); myKeyboardPanel.mySecondStroke.setVisible(selected); myMousePanel.setVisible(!selected); if (selected && myShortcut instanceof MouseShortcut) { setShortcut(null); } }