public class PopupMenu extends Menu
| Modifier and Type | Class and Description |
|---|---|
protected class |
PopupMenu.AccessibleAWTPopupMenu |
Menu.AccessibleAWTMenuMenuItem.AccessibleAWTMenuItemMenuComponent.AccessibleAWTMenuComponent| Constructor and Description |
|---|
PopupMenu()
Initializes a new instance of
PopupMenu. |
PopupMenu(String label)
Initializes a new instance of
PopupMenu with the specified
label. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotify()
Creates this object's native peer.
|
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this
PopupMenu. |
void |
show(Component component,
int x,
int y)
Displays this popup menu at the specified coordinates relative to
the specified component.
|
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotifyaddActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcutdispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFont, postEventpublic PopupMenu()
PopupMenu.HeadlessException - If GraphicsEnvironment.isHeadless()
returns true.public PopupMenu(String label)
PopupMenu with the specified
label.label - The label for this popup menu.HeadlessException - If GraphicsEnvironment.isHeadless()
returns true.public void addNotify()
public void show(Component component, int x, int y)
component - The component to which the display coordinates are relative.x - The X coordinate of the menu.y - The Y coordinate of the menu.public AccessibleContext getAccessibleContext()
PopupMenu.
The context is created, if necessary.getAccessibleContext in interface AccessiblegetAccessibleContext in class Menu