Contents

Swinging Duke
Feedback Button
Left ArrowRight Arrow

 

The Swing Popup Menu API

A popup menu is a menu that can appear anywhere in a window in response to a user event. The JPopupMenu class, a subclass of JComponent, implements popup menus in Swing.

In AWT, a PopupMenu was a menu that could be associated with a Component in such a way that the menu was displayed at the user's request by a given InputEvent. In Swing, a PopupMenu subclasses JComponent, which gives it the power to do all of the things that Swing components descending from JComponent can do.

Comprehensive documentation for the Swing menu system, including popup menus, is currently under development. For general information about menus and how they work in the Menu system as a whole, see the specification titled The Swing Menu System. Consult the menu-related JavaDoc APIs for current details.

Arrows


Version 0.5. Last modified 10/1/97.
Copyright © 1995-97 Sun Microsystems, Inc. All Rights Reserved.

Sun's Home Page