code: public static JMenuItem addMenuItem (
          JMenu menu, String name, Object target, String callbackName)
      {
          JMenuItem item = createItem(name, null, null);
          item.addActionListener(new ReflectedAction(target, callbackName));
          menu.add(item);
          return item;
      }
docs: Adds a new menu item to the menu with the specified name and
  attributes. The supplied method name will be called (it must have
  the same signature as {@link ActionListener#actionPerformed} but
  can be named whatever you like) when the menu item is selected.
  
  @param menu the menu to add the item to.
  @param name the item name.
  @param target the object on which to invoke a method when the menu is selected.
  @param callbackName the name of the method to invoke when the menu is selected.
  
  @return the new menu item.