1 | PopupMenus are defined with similar methods as regular Menus - there are methods to add menuItems. |
2 | When you add the PopupMenu itself to a component, it doesn't appear in the component window. |
3 | In the MouseListener, in the processMouseEvent() method, you can respond to the user's mouse click in the component by calling the show() method of the PopupMenu to make it appear. |
4 | The items of the PopupMenu can cause events, and you would create event listeners for those events in the usual way. |
5 | Another new AWT feature is that regular Menus can have keyboard MenuShortcuts. |