Action copyAction = TransferHandler.getCopyAction(); am.put(copyAction.getValue(Action.NAME), copyAction); Action cutAction = TransferHandler.getCutAction(); am.put(cutAction.getValue(Action.NAME), cutAction); Action pasteAction = TransferHandler.getPasteAction(); am.put(pasteAction.getValue(Action.NAME), pasteAction);
  ActionMap createActionMap()  {    Action[] actions = textComponent.getActions();    ActionMap am = new ActionMapUIResource();    for (int i = 0; i < actions.length; ++i)      {        String name = (String) actions[i].getValue(Action.NAME);        if (name != null)          am.put(name, actions[i]);      }    return am;  }