JPopupMenu

You can attach a to any of the following components:
JLabel, all kinds of buttons, JTextArea, JEditorPane, JTextPane, JList, JTable and JTree.

Because a popup menu is invisible (unless it is triggered), it has no visual representation in the design grid. To keep track of all popup menus, press <M>, this displays an for every popup menu as long as the key is pressed.

To attach a popup menu to a component, select 'Attach Popup Menu' from the component's or the popup menu icon from the components palette onto the desired component.

To edit a popup menu, select 'Edit Popup Menu Items' from the popup invoker's , this will open the which is similar to the Menu editor.

In the 'Edit Popup Menu Properties' you can edit the following properties:
Variable name: Specify a name for the popup menu.
Trigger mode: Decide which gesture makes the popup menu appear on screen.
Popup trigger is the platform dependent way to trigger popup menus, most often by pressing the right mouse button.
Button 1 displays the popup menu after the user pressed the left mouse button, you can decide if it is displayed on mouse released or on mouse pressed.
Always is the combination of the first two options.
Sensitive area: You can restrict the area within which the popup menu will be triggered. If the popup menu is triggered, the mouse event will be consumed.
Popup position: Specify where (relative to the invoking component) the popup menu will be displayed.
Pre-display method name: The method to execute before the popup menu is to be displayed. This allows for manipulating the popup menu's items dependent on your application's current state.

To copy, cut or remove a popup menu, select the appropriate command either from the popup invoker's context menu or from the of the popup container in the project view.