code: public JMenuItem addMenuItem(JMenu menu, String strCommand, ActionListener targetListener, KeyStroke keyStroke)
      {
          BaseAction action = new BaseAction(strCommand, targetListener);
          if (keyStroke != null)
              action.putValue(Action.ACCELERATOR_KEY, keyStroke);
          return this.addMenuItem(menu, strCommand, null);
      }
docs: Add this button to this window.
  @param strIcon The command and Icon name.
  @param strLink The button name.