Module java.desktop
Package javax.swing

Class JPopupMenu

java.lang.Object
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement
Direct Known Subclasses:
BasicComboPopup

@JavaBean(defaultProperty="UI", description="A small window that pops up and displays a series of choices.") public class JPopupMenu extends JComponent implements Accessible, MenuElement
An implementation of a popup menu -- a small window that pops up and displays a series of choices. A JPopupMenu is used for the menu that appears when the user selects an item on the menu bar. It is also used for "pull-right" menu that appears when the selects a menu item that activates it. Finally, a JPopupMenu can also be used anywhere else you want a menu to appear. For example, when the user right-clicks in a specified area.

For information and examples of using popup menus, see How to Use Menus in The Java Tutorial.

Warning: Swing is not thread safe. For more information see Swing's Threading Policy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.

Since:
1.2