Home » openjdk-7 » javax » swing » [javadoc | source]
javax.swing
public class: JPopupMenu [javadoc | source]
java.lang.Object
   java.awt.Component
      java.awt.Container
         javax.swing.JComponent
            javax.swing.JPopupMenu

All Implemented Interfaces:
    MenuElement, Accessible, HasGetTransferHandler, Serializable, MenuContainer, ImageObserver

Direct Known Subclasses:
    HistoryMenu, MetalComboPopup, SynthComboPopup, JPopupMenuUIResource, CancelEventFireStarter, Next20Menu, RightClickMenu, HTMLPopupMenu, ImagePopupMenu, ChooserComboPopup, BasicComboPopup

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 JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder .

Nested Class Summary:
protected class  JPopupMenu.AccessibleJPopupMenu  This class implements accessibility support for the JPopupMenu class. It provides an implementation of the Java Accessibility API appropriate to popup menu user-interface elements. 
public static class  JPopupMenu.Separator  A popup menu-specific separator. 
Field Summary
static  boolean popupPostionFixDisabled    Bug#4425878-Property javax.swing.adjustPopupLocationToFit introduced 
transient  Component invoker     
transient  Popup popup     
transient  Frame frame     
Fields inherited from javax.swing.JComponent:
DEBUG_GRAPHICS_LOADED,  ui,  listenerList,  paintingChild,  WHEN_FOCUSED,  WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,  WHEN_IN_FOCUSED_WINDOW,  UNDEFINED_CONDITION,  TOOL_TIP_TEXT_KEY,  focusController,  accessibleContext
Fields inherited from java.awt.Container:
layoutMgr,  containerListener,  listeningChildren,  listeningBoundsChildren,  descendantsCount,  preserveBackgroundColor,  INCLUDE_SELF,  SEARCH_HEAVYWEIGHTS,  modalComp,  modalAppContext
Fields inherited from java.awt.Component:
peer,  parent,  appContext,  x,  y,  width,  height,  foreground,  background,  font,  peerFont,  cursor,  locale,  bufferStrategy,  ignoreRepaint,  visible,  enabled,  dropTarget,  popups,  focusTraversalKeys,  LOCK,  minSize,  minSizeSet,  prefSize,  prefSizeSet,  maxSize,  maxSizeSet,  componentOrientation,  newEventsOnly,  componentListener,  focusListener,  hierarchyListener,  hierarchyBoundsListener,  keyListener,  mouseListener,  mouseMotionListener,  mouseWheelListener,  inputMethodListener,  windowClosingException,  actionListenerK,  adjustmentListenerK,  componentListenerK,  containerListenerK,  focusListenerK,  itemListenerK,  keyListenerK,  mouseListenerK,  mouseMotionListenerK,  mouseWheelListenerK,  textListenerK,  ownedWindowK,  windowListenerK,  inputMethodListenerK,  hierarchyListenerK,  hierarchyBoundsListenerK,  windowStateListenerK,  windowFocusListenerK,  eventMask,  isInc,  incRate,  TOP_ALIGNMENT,  CENTER_ALIGNMENT,  BOTTOM_ALIGNMENT,  LEFT_ALIGNMENT,  RIGHT_ALIGNMENT,  isPacked,  backgroundEraseDisabled,  eventCache,  accessibleContext
Constructor:
 public JPopupMenu() 
 public JPopupMenu(String label) 
    Constructs a JPopupMenu with the specified title.
    Parameters:
    label - the string that a UI may use to display as a title for the popup menu.
Method from javax.swing.JPopupMenu Summary:
add,   add,   add,   addMenuKeyListener,   addPopupMenuListener,   addSeparator,   adjustPopupLocationToFitScreen,   alwaysOnTop,   canPopupOverlapTaskBar,   createActionChangeListener,   createActionComponent,   firePopupMenuCanceled,   firePopupMenuWillBecomeInvisible,   firePopupMenuWillBecomeVisible,   getAccessibleContext,   getComponent,   getComponentAtIndex,   getComponentIndex,   getDefaultLightWeightPopupEnabled,   getInvoker,   getLabel,   getMargin,   getMenuKeyListeners,   getPopupMenuListeners,   getRootPopupMenu,   getSelectionModel,   getSubElements,   getUI,   getUIClassID,   insert,   insert,   isBorderPainted,   isLightWeightPopupEnabled,   isPopupTrigger,   isSubPopupMenu,   isVisible,   menuSelectionChanged,   pack,   paintBorder,   paramString,   processFocusEvent,   processKeyEvent,   processKeyEvent,   processMouseEvent,   remove,   removeMenuKeyListener,   removePopupMenuListener,   setBorderPainted,   setDefaultLightWeightPopupEnabled,   setInvoker,   setLabel,   setLightWeightPopupEnabled,   setLocation,   setPopupSize,   setPopupSize,   setSelected,   setSelectionModel,   setUI,   setVisible,   show,   updateUI
Methods from javax.swing.JComponent:
_paintImmediately,   addAncestorListener,   addNotify,   addVetoableChangeListener,   alwaysOnTop,   checkIfChildObscuredBySibling,   clientPropertyChanged,   compWriteObjectNotify,   componentInputMapChanged,   computeVisibleRect,   computeVisibleRect,   contains,   createToolTip,   disable,   dndDone,   dropLocationForPoint,   enable,   firePropertyChange,   firePropertyChange,   firePropertyChange,   fireVetoableChange,   getAccessibleContext,   getActionForKeyStroke,   getActionMap,   getActionMap,   getAlignmentX,   getAlignmentY,   getAncestorListeners,   getAutoscrolls,   getBaseline,   getBaselineResizeBehavior,   getBorder,   getBounds,   getClientProperty,   getComponentGraphics,   getComponentPopupMenu,   getConditionForKeyStroke,   getCreatedDoubleBuffer,   getDebugGraphicsOptions,   getDefaultLocale,   getFontMetrics,   getGraphics,   getGraphicsInvoked,   getHeight,   getInheritsPopupMenu,   getInputMap,   getInputMap,   getInputMap,   getInputVerifier,   getInsets,   getInsets,   getListeners,   getLocation,   getManagingFocusBackwardTraversalKeys,   getManagingFocusForwardTraversalKeys,   getMaximumSize,   getMinimumSize,   getNextFocusableComponent,   getPopupLocation,   getPreferredSize,   getRegisteredKeyStrokes,   getRootPane,   getSize,   getToolTipLocation,   getToolTipText,   getToolTipText,   getTopLevelAncestor,   getTransferHandler,   getUIClassID,   getVerifyInputWhenFocusTarget,   getVetoableChangeListeners,   getVisibleRect,   getWidth,   getWriteObjCounter,   getX,   getY,   grabFocus,   isDoubleBuffered,   isLightweightComponent,   isManagingFocus,   isOpaque,   isOptimizedDrawingEnabled,   isPainting,   isPaintingForPrint,   isPaintingOrigin,   isPaintingTile,   isRequestFocusEnabled,   isValidateRoot,   paint,   paintBorder,   paintChildren,   paintComponent,   paintForceDoubleBuffered,   paintImmediately,   paintImmediately,   paintToOffscreen,   paramString,   print,   printAll,   printBorder,   printChildren,   printComponent,   processComponentKeyEvent,   processKeyBinding,   processKeyBindings,   processKeyBindingsForAllComponents,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   putClientProperty,   rectangleIsObscured,   registerKeyboardAction,   registerKeyboardAction,   removeAncestorListener,   removeNotify,   removeVetoableChangeListener,   repaint,   repaint,   requestDefaultFocus,   requestFocus,   requestFocus,   requestFocusInWindow,   requestFocusInWindow,   resetKeyboardActions,   reshape,   revalidate,   safelyGetGraphics,   safelyGetGraphics,   scrollRectToVisible,   setActionMap,   setAlignmentX,   setAlignmentY,   setAutoscrolls,   setBackground,   setBorder,   setComponentPopupMenu,   setCreatedDoubleBuffer,   setDebugGraphicsOptions,   setDefaultLocale,   setDoubleBuffered,   setDropLocation,   setEnabled,   setFocusTraversalKeys,   setFont,   setForeground,   setInheritsPopupMenu,   setInputMap,   setInputVerifier,   setMaximumSize,   setMinimumSize,   setNextFocusableComponent,   setOpaque,   setPaintingChild,   setPreferredSize,   setRequestFocusEnabled,   setToolTipText,   setTransferHandler,   setUI,   setUIProperty,   setVerifyInputWhenFocusTarget,   setVisible,   setWriteObjCounter,   shouldDebugGraphics,   superProcessMouseMotionEvent,   unregisterKeyboardAction,   update,   updateUI
Methods from java.awt.Container:
add,   add,   add,   add,   add,   addContainerListener,   addImpl,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustDecendantsOnParent,   adjustDescendants,   adjustListeningChildren,   applyComponentOrientation,   areFocusTraversalKeysSet,   canContainFocusOwner,   checkGD,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   containsFocus,   countComponents,   countHierarchyMembers,   createChildHierarchyEvents,   createHierarchyEvents,   decreaseComponentCount,   deliverEvent,   dispatchEventImpl,   dispatchEventToSelf,   doLayout,   eventEnabled,   findComponentAt,   findComponentAt,   findComponentAt,   findComponentAtImpl,   getAccessibleAt,   getAccessibleChild,   getAccessibleChildrenCount,   getAlignmentX,   getAlignmentY,   getComponent,   getComponentAt,   getComponentAt,   getComponentCount,   getComponentZOrder,   getComponents,   getComponentsSync,   getComponents_NoClientCode,   getContainerListeners,   getDropTargetEventTarget,   getFocusTraversalKeys,   getFocusTraversalPolicy,   getHeavyweightContainer,   getInsets,   getLayout,   getListeners,   getMaximumSize,   getMinimumSize,   getMouseEventTarget,   getMousePosition,   getOpaqueShape,   getPreferredSize,   getTraversalRoot,   hasHeavyweightDescendants,   hasLightweightDescendants,   increaseComponentCount,   initializeFocusTraversalKeys,   insets,   invalidate,   invalidateParent,   invalidateTree,   isAncestorOf,   isFocusCycleRoot,   isFocusCycleRoot,   isFocusTraversalPolicyProvider,   isFocusTraversalPolicySet,   isRecursivelyVisibleUpToHeavyweightContainer,   isSameOrAncestorOf,   isValidateRoot,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   locate,   minimumSize,   mixOnHiding,   mixOnReshaping,   mixOnShowing,   mixOnValidating,   mixOnZOrderChanging,   numListening,   paint,   paintComponents,   paintHeavyweightComponents,   paramString,   postProcessKeyEvent,   postsOldMouseEvents,   preProcessKeyEvent,   preferredSize,   print,   printComponents,   printHeavyweightComponents,   processContainerEvent,   processEvent,   proxyEnableEvents,   recursiveApplyCurrentShape,   recursiveApplyCurrentShape,   recursiveApplyCurrentShape,   recursiveSubtractAndApplyShape,   recursiveSubtractAndApplyShape,   recursiveSubtractAndApplyShape,   remove,   remove,   removeAll,   removeContainerListener,   removeNotify,   setComponentZOrder,   setFocusCycleRoot,   setFocusTraversalKeys,   setFocusTraversalPolicy,   setFocusTraversalPolicyProvider,   setFont,   setLayout,   transferFocusDownCycle,   update,   updateGraphicsData,   validate,   validateTree,   validateUnconditionally
Methods from java.awt.Component:
action,   add,   addComponentListener,   addFocusListener,   addHierarchyBoundsListener,   addHierarchyListener,   addInputMethodListener,   addKeyListener,   addMouseListener,   addMouseMotionListener,   addMouseWheelListener,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustListeningChildrenOnParent,   applyComponentOrientation,   applyCompoundShape,   applyCurrentShape,   areBoundsValid,   areFocusTraversalKeysSet,   areInputMethodsEnabled,   autoProcessMouseWheel,   bounds,   canBeFocusOwner,   canBeFocusOwnerRecursively,   checkGD,   checkImage,   checkImage,   checkTreeLock,   checkWindowClosingException,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   coalesceEvents,   constructComponentName,   contains,   contains,   containsFocus,   countHierarchyMembers,   createBufferStrategy,   createBufferStrategy,   createHierarchyEvents,   createImage,   createImage,   createVolatileImage,   createVolatileImage,   deliverEvent,   disable,   disableEvents,   dispatchEvent,   dispatchEventImpl,   dispatchMouseWheelToAncestor,   doLayout,   enable,   enable,   enableEvents,   enableInputMethods,   eventEnabled,   eventTypeEnabled,   findUnderMouseInWindow,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   getAccessControlContext,   getAccessibleContext,   getAccessibleIndexInParent,   getAccessibleStateSet,   getAlignmentX,   getAlignmentY,   getBackBuffer,   getBackground,   getBaseline,   getBaselineResizeBehavior,   getBounds,   getBounds,   getBoundsOp,   getBufferStrategy,   getColorModel,   getComponentAt,   getComponentAt,   getComponentListeners,   getComponentOrientation,   getContainer,   getContainingWindow,   getCursor,   getCursor_NoClientCode,   getDropTarget,   getFocusCycleRootAncestor,   getFocusListeners,   getFocusTraversalKeys,   getFocusTraversalKeysEnabled,   getFocusTraversalKeys_NoIDCheck,   getFont,   getFontMetrics,   getFont_NoClientCode,   getForeground,   getGraphics,   getGraphicsConfiguration,   getGraphicsConfiguration_NoClientCode,   getGraphics_NoClientCode,   getHWPeerAboveMe,   getHeight,   getHierarchyBoundsListeners,   getHierarchyListeners,   getIgnoreRepaint,   getInputContext,   getInputMethodListeners,   getInputMethodRequests,   getKeyListeners,   getListeners,   getLocale,   getLocation,   getLocation,   getLocationOnScreen,   getLocationOnScreen_NoTreeLock,   getLocationOnWindow,   getMaximumSize,   getMinimumSize,   getMouseListeners,   getMouseMotionListeners,   getMousePosition,   getMouseWheelListeners,   getName,   getNativeContainer,   getNextFocusCandidate,   getNormalShape,   getObjectLock,   getOpaqueShape,   getParent,   getParent_NoClientCode,   getPeer,   getPreferredSize,   getPropertyChangeListeners,   getPropertyChangeListeners,   getSiblingIndexAbove,   getSiblingIndexBelow,   getSize,   getSize,   getToolkit,   getToolkitImpl,   getTraversalRoot,   getTreeLock,   getWidth,   getX,   getY,   gotFocus,   handleEvent,   hasFocus,   hide,   imageUpdate,   initializeFocusTraversalKeys,   inside,   invalidate,   invalidateIfValid,   invalidateParent,   isAutoFocusTransferOnDisposal,   isBackgroundSet,   isCoalescingEnabled,   isCursorSet,   isDisplayable,   isDoubleBuffered,   isEnabled,   isEnabledImpl,   isFocusCycleRoot,   isFocusOwner,   isFocusTraversable,   isFocusTraversableOverridden,   isFocusable,   isFontSet,   isForegroundSet,   isInstanceOf,   isLightweight,   isMaximumSizeSet,   isMinimumSizeSet,   isMixingNeeded,   isNonOpaqueForMixing,   isOpaque,   isPreferredSizeSet,   isRecursivelyVisible,   isSameOrAncestorOf,   isShowing,   isValid,   isVisible,   isVisible_NoClientCode,   keyDown,   keyUp,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   list,   list,   list,   locate,   location,   lostFocus,   minimumSize,   mixOnHiding,   mixOnReshaping,   mixOnShowing,   mixOnValidating,   mixOnZOrderChanging,   mouseDown,   mouseDrag,   mouseEnter,   mouseExit,   mouseMove,   mouseUp,   move,   nextFocus,   numListening,   paint,   paintAll,   paintHeavyweightComponents,   paramString,   pointRelativeToComponent,   postEvent,   postsOldMouseEvents,   preferredSize,   prepareImage,   prepareImage,   print,   printAll,   printHeavyweightComponents,   processComponentEvent,   processEvent,   processFocusEvent,   processHierarchyBoundsEvent,   processHierarchyEvent,   processInputMethodEvent,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   processMouseWheelEvent,   relocateComponent,   remove,   removeComponentListener,   removeFocusListener,   removeHierarchyBoundsListener,   removeHierarchyListener,   removeInputMethodListener,   removeKeyListener,   removeMouseListener,   removeMouseMotionListener,   removeMouseWheelListener,   removeNotify,   removePropertyChangeListener,   removePropertyChangeListener,   repaint,   repaint,   repaint,   repaint,   requestFocus,   requestFocus,   requestFocus,   requestFocus,   requestFocusHelper,   requestFocusHelper,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   reshape,   resize,   resize,   revalidate,   setAutoFocusTransferOnDisposal,   setBackground,   setBounds,   setBounds,   setBoundsOp,   setComponentOrientation,   setCursor,   setDropTarget,   setEnabled,   setFocusTraversalKeys,   setFocusTraversalKeysEnabled,   setFocusTraversalKeys_NoIDCheck,   setFocusable,   setFont,   setForeground,   setGraphicsConfiguration,   setIgnoreRepaint,   setLocale,   setLocation,   setLocation,   setMaximumSize,   setMinimumSize,   setName,   setPreferredSize,   setRequestFocusController,   setSize,   setSize,   setVisible,   show,   show,   size,   subtractAndApplyShape,   subtractAndApplyShapeBelowMe,   toString,   transferFocus,   transferFocus,   transferFocusBackward,   transferFocusBackward,   transferFocusUpCycle,   update,   updateCursorImmediately,   updateGraphicsData,   updateZOrder,   validate
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.JPopupMenu Detail:
 public JMenuItem add(JMenuItem menuItem) 
    Appends the specified menu item to the end of this menu.
 public JMenuItem add(String s) 
    Creates a new menu item with the specified text and appends it to the end of this menu.
 public JMenuItem add(Action a) 
    Appends a new menu item to the end of the menu which dispatches the specified Action object.
 public  void addMenuKeyListener(MenuKeyListener l) 
    Adds a MenuKeyListener to the popup menu.
 public  void addPopupMenuListener(PopupMenuListener l) 
    Adds a PopupMenu listener.
 public  void addSeparator() 
    Appends a new separator at the end of the menu.
 Point adjustPopupLocationToFitScreen(int xPosition,
    int yPosition) 
    Returns an point which has been adjusted to take into account of the desktop bounds, taskbar and multi-monitor configuration.

    This adustment may be cancelled by invoking the application with -Djavax.swing.adjustPopupLocationToFit=false

 boolean alwaysOnTop() 
    Always returns true since popups, by definition, should always be on top of all other windows.
 static boolean canPopupOverlapTaskBar() 
    Checks that there are enough security permissions to make popup "always on top", which allows to show it above the task bar.
 protected PropertyChangeListener createActionChangeListener(JMenuItem b) 
    Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
 protected JMenuItem createActionComponent(Action a) 
    Factory method which creates the JMenuItem for Actions added to the JPopupMenu.
 protected  void firePopupMenuCanceled() 
    Notifies PopupMenuListeners that this popup menu is cancelled.
 protected  void firePopupMenuWillBecomeInvisible() 
    Notifies PopupMenuListeners that this popup menu will become invisible.
 protected  void firePopupMenuWillBecomeVisible() 
    Notifies PopupMenuListeners that this popup menu will become visible.
 public AccessibleContext getAccessibleContext() 
    Gets the AccessibleContext associated with this JPopupMenu. For JPopupMenus, the AccessibleContext takes the form of an AccessibleJPopupMenu. A new AccessibleJPopupMenu instance is created if necessary.
 public Component getComponent() 
    Returns this JPopupMenu component.
 public Component getComponentAtIndex(int i) 
Deprecated! replaced - by java.awt.Container#getComponent(int)

    Returns the component at the specified index.
 public int getComponentIndex(Component c) 
    Returns the index of the specified component.
 public static boolean getDefaultLightWeightPopupEnabled() 
    Gets the defaultLightWeightPopupEnabled property, which by default is true.
 public Component getInvoker() 
    Returns the component which is the 'invoker' of this popup menu.
 public String getLabel() 
    Returns the popup menu's label
 public Insets getMargin() 
    Returns the margin, in pixels, between the popup menu's border and its containees.
 public MenuKeyListener[] getMenuKeyListeners() 
    Returns an array of all the MenuKeyListeners added to this JPopupMenu with addMenuKeyListener().
 public PopupMenuListener[] getPopupMenuListeners() 
    Returns an array of all the PopupMenuListeners added to this JMenuItem with addPopupMenuListener().
 JPopupMenu getRootPopupMenu() 
    Returns the popup menu which is at the root of the menu system for this popup menu.
 public SingleSelectionModel getSelectionModel() 
    Returns the model object that handles single selections.
 public MenuElement[] getSubElements() 
    Returns an array of MenuElements containing the submenu for this menu component. It will only return items conforming to the JMenuElement interface. If popup menu is null returns an empty array. This method is required to conform to the MenuElement interface.
 public PopupMenuUI getUI() 
    Returns the look and feel (L&F) object that renders this component.
 public String getUIClassID() 
    Returns the name of the L&F class that renders this component.
 public  void insert(Action a,
    int index) 
    Inserts a menu item for the specified Action object at a given position.
 public  void insert(Component component,
    int index) 
    Inserts the specified component into the menu at a given position.
 public boolean isBorderPainted() 
    Checks whether the border should be painted.
 public boolean isLightWeightPopupEnabled() 
    Gets the lightWeightPopupEnabled property.
 public boolean isPopupTrigger(MouseEvent e) 
    Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
 boolean isSubPopupMenu(JPopupMenu popup) 
    Examines the list of menu items to determine whether popup is a popup menu.
 public boolean isVisible() 
    Returns true if the popup menu is visible (currently being displayed).
 public  void menuSelectionChanged(boolean isIncluded) 
    Messaged when the menubar selection changes to activate or deactivate this menu. This implements the javax.swing.MenuElement interface. Overrides MenuElement.menuSelectionChanged.
 public  void pack() 
    Lays out the container so that it uses the minimum space needed to display its contents.
 protected  void paintBorder(Graphics g) 
    Paints the popup menu's border if the borderPainted property is true.
 protected String paramString() 
    Returns a string representation of this JPopupMenu. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
 protected  void processFocusEvent(FocusEvent evt) 
 protected  void processKeyEvent(KeyEvent evt) 
    Processes key stroke events such as mnemonics and accelerators.
 public  void processKeyEvent(KeyEvent e,
    MenuElement[] path,
    MenuSelectionManager manager) 
    Processes a key event forwarded from the MenuSelectionManager and changes the menu selection, if necessary, by using MenuSelectionManager's API.

    Note: you do not have to forward the event to sub-components. This is done automatically by the MenuSelectionManager.

 public  void processMouseEvent(MouseEvent event,
    MenuElement[] path,
    MenuSelectionManager manager) 
    This method is required to conform to the MenuElement interface, but it not implemented.
 public  void remove(int pos) 
    Removes the component at the specified index from this popup menu.
 public  void removeMenuKeyListener(MenuKeyListener l) 
    Removes a MenuKeyListener from the popup menu.
 public  void removePopupMenuListener(PopupMenuListener l) 
    Removes a PopupMenu listener.
 public  void setBorderPainted(boolean b) 
    Sets whether the border should be painted.
 public static  void setDefaultLightWeightPopupEnabled(boolean aFlag) 
    Sets the default value of the lightWeightPopupEnabled property.
 public  void setInvoker(Component invoker) 
    Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
 public  void setLabel(String label) 
    Sets the popup menu's label. Different look and feels may choose to display or not display this.
 public  void setLightWeightPopupEnabled(boolean aFlag) 
    Sets the value of the lightWeightPopupEnabled property, which by default is true. By default, when a look and feel displays a popup, it can choose to use a lightweight (all-Java) popup. Lightweight popup windows are more efficient than heavyweight (native peer) windows, but lightweight and heavyweight components do not mix well in a GUI. If your application mixes lightweight and heavyweight components, you should disable lightweight popups. Some look and feels might always use heavyweight popups, no matter what the value of this property.
 public  void setLocation(int x,
    int y) 
    Sets the location of the upper left corner of the popup menu using x, y coordinates.
 public  void setPopupSize(Dimension d) 
    Sets the size of the Popup window using a Dimension object. This is equivalent to setPreferredSize(d).
 public  void setPopupSize(int width,
    int height) 
    Sets the size of the Popup window to the specified width and height. This is equivalent to setPreferredSize(new Dimension(width, height)).
 public  void setSelected(Component sel) 
    Sets the currently selected component, This will result in a change to the selection model.
 public  void setSelectionModel(SingleSelectionModel model) 
    Sets the model object to handle single selections.
 public  void setUI(PopupMenuUI ui) 
    Sets the L&F object that renders this component.
 public  void setVisible(boolean b) 
    Sets the visibility of the popup menu.
 public  void show(Component invoker,
    int x,
    int y) 
    Displays the popup menu at the position x,y in the coordinate space of the component invoker.
 public  void updateUI() 
    Resets the UI property to a value from the current look and feel.