private void unbind(KeyStroke accelerator) {
        if (accelerator != null) {
            component.getInputMap().remove(accelerator);
            component.getActionMap().remove(accelerator);
        }
    }