Interface MenuItemFactory

    • Method Detail

      • create

        javax.swing.JMenuItem create​(JContextMenu menu,
                                     NamedObj target)
        Add an item to the given context menu that will operate on specified target, and return the menu item. Return null to decline to add a menu item for the specified target.
        Parameters:
        menu - The context menu to add to.
        target - The object that the menu item command will operate on.
        Returns:
        A menu item, or null to decline to provide a menu item.