protected void uninstallKeyboardActions() {
    InputMap input = peer
        .getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    ActionMap action = peer.getActionMap();

    input.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
    input.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0));

    action.remove(ENTER_KEY);
    action.remove(ESCAPE_KEY);

  }
protected void uninstallKeyboardActions()