SwingUtilities.replaceUIActionMap(textComponent, getActionMap());
SwingUtilities.replaceUIActionMap(textComponent, createActionMap());  ActionMap parentActionMap = new ActionMapUIResource(); Action[] actions = textComponent.getActions(); for (int j = 0; j < actions.length; j++) { Action currAction = actions[j]; parentActionMap.put(currAction.getValue(Action.NAME), currAction); }  SwingUtilities.replaceUIActionMap(textComponent, parentActionMap);
  protected void installKeyboardActions()  {        // load any bindings for the older Keymap interface    Keymap km = JTextComponent.getKeymap(getKeymapName());    if (km == null)      km = createKeymap();    textComponent.setKeymap(km);    // load any bindings for the newer InputMap / ActionMap interface    SwingUtilities.replaceUIInputMap(textComponent,                                      JComponent.WHEN_FOCUSED,                                     getInputMap(JComponent.WHEN_FOCUSED));    SwingUtilities.replaceUIActionMap(textComponent, getActionMap());  }