| public class java.awt PopupMenu
|
Java SE 6 |
As the inheritance hierarchy implies, a PopupMenu
can be used anywhere a Menu can be used.
However, if you use a PopupMenu like a Menu
(e.g., you add it to a MenuBar), then you cannot
call show on that PopupMenu.
| version | 1.34 04/07/06 |
| Constructors | |||||||
|---|---|---|---|---|---|---|---|
| public | PopupMenu() throws HeadlessException Details
Creates a new popup menu with an empty name.
| ||||||
| public | PopupMenu(String label) throws HeadlessException Details
Creates a new popup menu with the specified name.
| ||||||
| Methods | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void | addNotify() Creates the popup menu's peer. The peer allows us to change the appearance of the popup menu without changing any of the popup menu's functionality. | ||||||||||||||
| public void | show(Component origin, int x, int y) Details
Shows the popup menu at the x, y position relative to an origin
component.
The origin component must be contained within the component
hierarchy of the popup menu's parent. Both the origin and the parent
must be showing on the screen for this method to be valid.
If this
| ||||||||||||||
| Properties | |||||
|---|---|---|---|---|---|
| public AccessibleContext | getAccessibleContext() Details
Gets the AccessibleContext associated with this
PopupMenu.
| ||||
| public MenuContainer | getParent() Returns the parent container for this menu component. | ||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2013 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|