javax.swing
Class JPopupMenu

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container sample code for java.awt.Container definition code for java.awt.Container 
          extended by javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent 
              extended by javax.swing.JPopupMenu
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
Direct Known Subclasses:
BasicComboPopup sample code for javax.swing.plaf.basic.BasicComboPopup definition code for javax.swing.plaf.basic.BasicComboPopup

public class JPopupMenu
extends JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
implements Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.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: 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 XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Nested Class Summary
protected  class JPopupMenu.AccessibleJPopupMenu sample code for javax.swing.JPopupMenu.AccessibleJPopupMenu definition code for javax.swing.JPopupMenu.AccessibleJPopupMenu
          This class implements accessibility support for the JPopupMenu class.
static class JPopupMenu.Separator sample code for javax.swing.JPopupMenu.Separator definition code for javax.swing.JPopupMenu.Separator
          A popup menu-specific separator.
 
Nested classes/interfaces inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
JComponent.AccessibleJComponent sample code for javax.swing.JComponent.AccessibleJComponent definition code for javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
accessibleContext sample code for javax.swing.JComponent.accessibleContext definition code for javax.swing.JComponent.accessibleContext , listenerList sample code for javax.swing.JComponent.listenerList definition code for javax.swing.JComponent.listenerList , TOOL_TIP_TEXT_KEY sample code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY definition code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY , ui sample code for javax.swing.JComponent.ui definition code for javax.swing.JComponent.ui , UNDEFINED_CONDITION sample code for javax.swing.JComponent.UNDEFINED_CONDITION definition code for javax.swing.JComponent.UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT sample code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT definition code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED sample code for javax.swing.JComponent.WHEN_FOCUSED definition code for javax.swing.JComponent.WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW sample code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW definition code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
JPopupMenu sample code for javax.swing.JPopupMenu.JPopupMenu() definition code for javax.swing.JPopupMenu.JPopupMenu() ()
          Constructs a JPopupMenu without an "invoker".
JPopupMenu sample code for javax.swing.JPopupMenu.JPopupMenu(java.lang.String) definition code for javax.swing.JPopupMenu.JPopupMenu(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  label)
          Constructs a JPopupMenu with the specified title.
 
Method Summary
 JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem add sample code for javax.swing.JPopupMenu.add(javax.swing.Action) definition code for javax.swing.JPopupMenu.add(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
          Appends a new menu item to the end of the menu which dispatches the specified Action object.
 JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem add sample code for javax.swing.JPopupMenu.add(javax.swing.JMenuItem) definition code for javax.swing.JPopupMenu.add(javax.swing.JMenuItem) (JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
          Appends the specified menu item to the end of this menu.
 JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem add sample code for javax.swing.JPopupMenu.add(java.lang.String) definition code for javax.swing.JPopupMenu.add(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  s)
          Creates a new menu item with the specified text and appends it to the end of this menu.
 void addMenuKeyListener sample code for javax.swing.JPopupMenu.addMenuKeyListener(javax.swing.event.MenuKeyListener) definition code for javax.swing.JPopupMenu.addMenuKeyListener(javax.swing.event.MenuKeyListener) (MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  l)
          Adds a MenuKeyListener to the popup menu.
 void addPopupMenuListener sample code for javax.swing.JPopupMenu.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JPopupMenu.addPopupMenuListener(javax.swing.event.PopupMenuListener) (PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
          Adds a PopupMenu listener.
 void addSeparator sample code for javax.swing.JPopupMenu.addSeparator() definition code for javax.swing.JPopupMenu.addSeparator() ()
          Appends a new separator at the end of the menu.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createActionChangeListener sample code for javax.swing.JPopupMenu.createActionChangeListener(javax.swing.JMenuItem) definition code for javax.swing.JPopupMenu.createActionChangeListener(javax.swing.JMenuItem) (JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  b)
          Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur.
protected  JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem createActionComponent sample code for javax.swing.JPopupMenu.createActionComponent(javax.swing.Action) definition code for javax.swing.JPopupMenu.createActionComponent(javax.swing.Action) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
          Factory method which creates the JMenuItem for Actions added to the JPopupMenu.
protected  void firePopupMenuCanceled sample code for javax.swing.JPopupMenu.firePopupMenuCanceled() definition code for javax.swing.JPopupMenu.firePopupMenuCanceled() ()
          Notifies PopupMenuListeners that this popup menu is cancelled.
protected  void firePopupMenuWillBecomeInvisible sample code for javax.swing.JPopupMenu.firePopupMenuWillBecomeInvisible() definition code for javax.swing.JPopupMenu.firePopupMenuWillBecomeInvisible() ()
          Notifies PopupMenuListeners that this popup menu will become invisible.
protected  void firePopupMenuWillBecomeVisible sample code for javax.swing.JPopupMenu.firePopupMenuWillBecomeVisible() definition code for javax.swing.JPopupMenu.firePopupMenuWillBecomeVisible() ()
          Notifies PopupMenuListeners that this popup menu will become visible.
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for javax.swing.JPopupMenu.getAccessibleContext() definition code for javax.swing.JPopupMenu.getAccessibleContext() ()
          Gets the AccessibleContext associated with this JPopupMenu.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponent sample code for javax.swing.JPopupMenu.getComponent() definition code for javax.swing.JPopupMenu.getComponent() ()
          Returns this JPopupMenu component.
 Component sample code for java.awt.Component definition code for java.awt.Component getComponentAtIndex sample code for javax.swing.JPopupMenu.getComponentAtIndex(int) definition code for javax.swing.JPopupMenu.getComponentAtIndex(int) (int i)
          Deprecated. replaced by getComponent(int i)
 int getComponentIndex sample code for javax.swing.JPopupMenu.getComponentIndex(java.awt.Component) definition code for javax.swing.JPopupMenu.getComponentIndex(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Returns the index of the specified component.
static boolean getDefaultLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled() ()
          Gets the defaultLightWeightPopupEnabled property, which by default is true.
 Component sample code for java.awt.Component definition code for java.awt.Component getInvoker sample code for javax.swing.JPopupMenu.getInvoker() definition code for javax.swing.JPopupMenu.getInvoker() ()
          Returns the component which is the 'invoker' of this popup menu.
 String sample code for java.lang.String definition code for java.lang.String getLabel sample code for javax.swing.JPopupMenu.getLabel() definition code for javax.swing.JPopupMenu.getLabel() ()
          Returns the popup menu's label
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getMargin sample code for javax.swing.JPopupMenu.getMargin() definition code for javax.swing.JPopupMenu.getMargin() ()
          Returns the margin, in pixels, between the popup menu's border and its containees.
 MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener [] getMenuKeyListeners sample code for javax.swing.JPopupMenu.getMenuKeyListeners() definition code for javax.swing.JPopupMenu.getMenuKeyListeners() ()
          Returns an array of all the MenuKeyListeners added to this JPopupMenu with addMenuKeyListener().
 PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener [] getPopupMenuListeners sample code for javax.swing.JPopupMenu.getPopupMenuListeners() definition code for javax.swing.JPopupMenu.getPopupMenuListeners() ()
          Returns an array of all the PopupMenuListeners added to this JMenuItem with addPopupMenuListener().
 SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel getSelectionModel sample code for javax.swing.JPopupMenu.getSelectionModel() definition code for javax.swing.JPopupMenu.getSelectionModel() ()
          Returns the model object that handles single selections.
 MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] getSubElements sample code for javax.swing.JPopupMenu.getSubElements() definition code for javax.swing.JPopupMenu.getSubElements() ()
          Returns an array of MenuElements containing the submenu for this menu component.
 PopupMenuUI sample code for javax.swing.plaf.PopupMenuUI definition code for javax.swing.plaf.PopupMenuUI getUI sample code for javax.swing.JPopupMenu.getUI() definition code for javax.swing.JPopupMenu.getUI() ()
          Returns the look and feel (L&F) object that renders this component.
 String sample code for java.lang.String definition code for java.lang.String getUIClassID sample code for javax.swing.JPopupMenu.getUIClassID() definition code for javax.swing.JPopupMenu.getUIClassID() ()
          Returns the name of the L&F class that renders this component.
 void insert sample code for javax.swing.JPopupMenu.insert(javax.swing.Action, int) definition code for javax.swing.JPopupMenu.insert(javax.swing.Action, int) (Action sample code for javax.swing.Action definition code for javax.swing.Action  a, int index)
          Inserts a menu item for the specified Action object at a given position.
 void insert sample code for javax.swing.JPopupMenu.insert(java.awt.Component, int) definition code for javax.swing.JPopupMenu.insert(java.awt.Component, int) (Component sample code for java.awt.Component definition code for java.awt.Component  component, int index)
          Inserts the specified component into the menu at a given position.
 boolean isBorderPainted sample code for javax.swing.JPopupMenu.isBorderPainted() definition code for javax.swing.JPopupMenu.isBorderPainted() ()
          Checks whether the border should be painted.
 boolean isLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.isLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.isLightWeightPopupEnabled() ()
          Gets the lightWeightPopupEnabled property.
 boolean isPopupTrigger sample code for javax.swing.JPopupMenu.isPopupTrigger(java.awt.event.MouseEvent) definition code for javax.swing.JPopupMenu.isPopupTrigger(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.
 boolean isVisible sample code for javax.swing.JPopupMenu.isVisible() definition code for javax.swing.JPopupMenu.isVisible() ()
          Returns true if the popup menu is visible (currently being displayed).
 void menuSelectionChanged sample code for javax.swing.JPopupMenu.menuSelectionChanged(boolean) definition code for javax.swing.JPopupMenu.menuSelectionChanged(boolean) (boolean isIncluded)
          Messaged when the menubar selection changes to activate or deactivate this menu.
 void pack sample code for javax.swing.JPopupMenu.pack() definition code for javax.swing.JPopupMenu.pack() ()
          Lays out the container so that it uses the minimum space needed to display its contents.
protected  void paintBorder sample code for javax.swing.JPopupMenu.paintBorder(java.awt.Graphics) definition code for javax.swing.JPopupMenu.paintBorder(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Paints the popup menu's border if the borderPainted property is true.
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for javax.swing.JPopupMenu.paramString() definition code for javax.swing.JPopupMenu.paramString() ()
          Returns a string representation of this JPopupMenu.
protected  void processFocusEvent sample code for javax.swing.JPopupMenu.processFocusEvent(java.awt.event.FocusEvent) definition code for javax.swing.JPopupMenu.processFocusEvent(java.awt.event.FocusEvent) (FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  evt)
          Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected  void processKeyEvent sample code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent) (KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  evt)
          Processes key stroke events such as mnemonics and accelerators.
 void processKeyEvent sample code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) (KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e, MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] path, MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager  manager)
          Processes a key event forwarded from the MenuSelectionManager and changes the menu selection, if necessary, by using MenuSelectionManager's API.
 void processMouseEvent sample code for javax.swing.JPopupMenu.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.JPopupMenu.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  event, MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] path, MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager  manager)
          This method is required to conform to the MenuElement interface, but it not implemented.
 void remove sample code for javax.swing.JPopupMenu.remove(int) definition code for javax.swing.JPopupMenu.remove(int) (int pos)
          Removes the component at the specified index from this popup menu.
 void removeMenuKeyListener sample code for javax.swing.JPopupMenu.removeMenuKeyListener(javax.swing.event.MenuKeyListener) definition code for javax.swing.JPopupMenu.removeMenuKeyListener(javax.swing.event.MenuKeyListener) (MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  l)
          Removes a MenuKeyListener from the popup menu.
 void removePopupMenuListener sample code for javax.swing.JPopupMenu.removePopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JPopupMenu.removePopupMenuListener(javax.swing.event.PopupMenuListener) (PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
          Removes a PopupMenu listener.
 void setBorderPainted sample code for javax.swing.JPopupMenu.setBorderPainted(boolean) definition code for javax.swing.JPopupMenu.setBorderPainted(boolean) (boolean b)
          Sets whether the border should be painted.
static void setDefaultLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean) (boolean aFlag)
          Sets the default value of the lightWeightPopupEnabled property.
 void setInvoker sample code for javax.swing.JPopupMenu.setInvoker(java.awt.Component) definition code for javax.swing.JPopupMenu.setInvoker(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  invoker)
          Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
 void setLabel sample code for javax.swing.JPopupMenu.setLabel(java.lang.String) definition code for javax.swing.JPopupMenu.setLabel(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  label)
          Sets the popup menu's label.
 void setLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean) (boolean aFlag)
          Sets the value of the lightWeightPopupEnabled property, which by default is true.
 void setLocation sample code for javax.swing.JPopupMenu.setLocation(int, int) definition code for javax.swing.JPopupMenu.setLocation(int, int) (int x, int y)
          Sets the location of the upper left corner of the popup menu using x, y coordinates.
 void setPopupSize sample code for javax.swing.JPopupMenu.setPopupSize(java.awt.Dimension) definition code for javax.swing.JPopupMenu.setPopupSize(java.awt.Dimension) (Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  d)
          Sets the size of the Popup window using a Dimension object.
 void setPopupSize sample code for javax.swing.JPopupMenu.setPopupSize(int, int) definition code for javax.swing.JPopupMenu.setPopupSize(int, int) (int width, int height)
          Sets the size of the Popup window to the specified width and height.
 void setSelected sample code for javax.swing.JPopupMenu.setSelected(java.awt.Component) definition code for javax.swing.JPopupMenu.setSelected(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  sel)
          Sets the currently selected component, This will result in a change to the selection model.
 void setSelectionModel sample code for javax.swing.JPopupMenu.setSelectionModel(javax.swing.SingleSelectionModel) definition code for javax.swing.JPopupMenu.setSelectionModel(javax.swing.SingleSelectionModel) (SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel  model)
          Sets the model object to handle single selections.
 void setUI sample code for javax.swing.JPopupMenu.setUI(javax.swing.plaf.PopupMenuUI) definition code for javax.swing.JPopupMenu.setUI(javax.swing.plaf.PopupMenuUI) (PopupMenuUI sample code for javax.swing.plaf.PopupMenuUI definition code for javax.swing.plaf.PopupMenuUI  ui)
          Sets the L&F object that renders this component.
 void setVisible sample code for javax.swing.JPopupMenu.setVisible(boolean) definition code for javax.swing.JPopupMenu.setVisible(boolean) (boolean b)
          Sets the visibility of the popup menu.
 void show sample code for javax.swing.JPopupMenu.show(java.awt.Component, int, int) definition code for javax.swing.JPopupMenu.show(java.awt.Component, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  invoker, int x, int y)
          Displays the popup menu at the position x,y in the coordinate space of the component invoker.
 void updateUI sample code for javax.swing.JPopupMenu.updateUI() definition code for javax.swing.JPopupMenu.updateUI() ()
          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
addAncestorListener sample code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) , addNotify sample code for javax.swing.JComponent.addNotify() definition code for javax.swing.JComponent.addNotify() , addVetoableChangeListener sample code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) , computeVisibleRect sample code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) definition code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) , contains sample code for javax.swing.JComponent.contains(int, int) definition code for javax.swing.JComponent.contains(int, int) , createToolTip sample code for javax.swing.JComponent.createToolTip() definition code for javax.swing.JComponent.createToolTip() , disable sample code for javax.swing.JComponent.disable() definition code for javax.swing.JComponent.disable() , enable sample code for javax.swing.JComponent.enable() definition code for javax.swing.JComponent.enable() , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) , fireVetoableChange sample code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) , getActionForKeyStroke sample code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) , getActionMap sample code for javax.swing.JComponent.getActionMap() definition code for javax.swing.JComponent.getActionMap() , getAlignmentX sample code for javax.swing.JComponent.getAlignmentX() definition code for javax.swing.JComponent.getAlignmentX() , getAlignmentY sample code for javax.swing.JComponent.getAlignmentY() definition code for javax.swing.JComponent.getAlignmentY() , getAncestorListeners sample code for javax.swing.JComponent.getAncestorListeners() definition code for javax.swing.JComponent.getAncestorListeners() , getAutoscrolls sample code for javax.swing.JComponent.getAutoscrolls() definition code for javax.swing.JComponent.getAutoscrolls() , getBorder sample code for javax.swing.JComponent.getBorder() definition code for javax.swing.JComponent.getBorder() , getBounds sample code for javax.swing.JComponent.getBounds(java.awt.Rectangle) definition code for javax.swing.JComponent.getBounds(java.awt.Rectangle) , getClientProperty sample code for javax.swing.JComponent.getClientProperty(java.lang.Object) definition code for javax.swing.JComponent.getClientProperty(java.lang.Object) , getComponentGraphics sample code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) definition code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) , getComponentPopupMenu sample code for javax.swing.JComponent.getComponentPopupMenu() definition code for javax.swing.JComponent.getComponentPopupMenu() , getConditionForKeyStroke sample code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) , getDebugGraphicsOptions sample code for javax.swing.JComponent.getDebugGraphicsOptions() definition code for javax.swing.JComponent.getDebugGraphicsOptions() , getDefaultLocale sample code for javax.swing.JComponent.getDefaultLocale() definition code for javax.swing.JComponent.getDefaultLocale() , getFontMetrics sample code for javax.swing.JComponent.getFontMetrics(java.awt.Font) definition code for javax.swing.JComponent.getFontMetrics(java.awt.Font) , getGraphics sample code for javax.swing.JComponent.getGraphics() definition code for javax.swing.JComponent.getGraphics() , getHeight sample code for javax.swing.JComponent.getHeight() definition code for javax.swing.JComponent.getHeight() , getInheritsPopupMenu sample code for javax.swing.JComponent.getInheritsPopupMenu() definition code for javax.swing.JComponent.getInheritsPopupMenu() , getInputMap sample code for javax.swing.JComponent.getInputMap() definition code for javax.swing.JComponent.getInputMap() , getInputMap sample code for javax.swing.JComponent.getInputMap(int) definition code for javax.swing.JComponent.getInputMap(int) , getInputVerifier sample code for javax.swing.JComponent.getInputVerifier() definition code for javax.swing.JComponent.getInputVerifier() , getInsets sample code for javax.swing.JComponent.getInsets() definition code for javax.swing.JComponent.getInsets() , getInsets sample code for javax.swing.JComponent.getInsets(java.awt.Insets) definition code for javax.swing.JComponent.getInsets(java.awt.Insets) , getListeners sample code for javax.swing.JComponent.getListeners(java.lang.Class) definition code for javax.swing.JComponent.getListeners(java.lang.Class) , getLocation sample code for javax.swing.JComponent.getLocation(java.awt.Point) definition code for javax.swing.JComponent.getLocation(java.awt.Point) , getMaximumSize sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , getMinimumSize sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , getNextFocusableComponent sample code for javax.swing.JComponent.getNextFocusableComponent() definition code for javax.swing.JComponent.getNextFocusableComponent() , getPopupLocation sample code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) , getPreferredSize sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , getRegisteredKeyStrokes sample code for javax.swing.JComponent.getRegisteredKeyStrokes() definition code for javax.swing.JComponent.getRegisteredKeyStrokes() , getRootPane sample code for javax.swing.JComponent.getRootPane() definition code for javax.swing.JComponent.getRootPane() , getSize sample code for javax.swing.JComponent.getSize(java.awt.Dimension) definition code for javax.swing.JComponent.getSize(java.awt.Dimension) , getToolTipLocation sample code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) , getToolTipText sample code for javax.swing.JComponent.getToolTipText() definition code for javax.swing.JComponent.getToolTipText() , getToolTipText sample code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) , getTopLevelAncestor sample code for javax.swing.JComponent.getTopLevelAncestor() definition code for javax.swing.JComponent.getTopLevelAncestor() , getTransferHandler sample code for javax.swing.JComponent.getTransferHandler() definition code for javax.swing.JComponent.getTransferHandler() , getVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() definition code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() , getVetoableChangeListeners sample code for javax.swing.JComponent.getVetoableChangeListeners() definition code for javax.swing.JComponent.getVetoableChangeListeners() , getVisibleRect sample code for javax.swing.JComponent.getVisibleRect() definition code for javax.swing.JComponent.getVisibleRect() , getWidth sample code for javax.swing.JComponent.getWidth() definition code for javax.swing.JComponent.getWidth() , getX sample code for javax.swing.JComponent.getX() definition code for javax.swing.JComponent.getX() , getY sample code for javax.swing.JComponent.getY() definition code for javax.swing.JComponent.getY() , grabFocus sample code for javax.swing.JComponent.grabFocus() definition code for javax.swing.JComponent.grabFocus() , isDoubleBuffered sample code for javax.swing.JComponent.isDoubleBuffered() definition code for javax.swing.JComponent.isDoubleBuffered() , isLightweightComponent sample code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) definition code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) , isManagingFocus sample code for javax.swing.JComponent.isManagingFocus() definition code for javax.swing.JComponent.isManagingFocus() , isOpaque sample code for javax.swing.JComponent.isOpaque() definition code for javax.swing.JComponent.isOpaque() , isOptimizedDrawingEnabled sample code for javax.swing.JComponent.isOptimizedDrawingEnabled() definition code for javax.swing.JComponent.isOptimizedDrawingEnabled() , isPaintingTile sample code for javax.swing.JComponent.isPaintingTile() definition code for javax.swing.JComponent.isPaintingTile() , isRequestFocusEnabled sample code for javax.swing.JComponent.isRequestFocusEnabled() definition code for javax.swing.JComponent.isRequestFocusEnabled() , isValidateRoot sample code for javax.swing.JComponent.isValidateRoot() definition code for javax.swing.JComponent.isValidateRoot() , paint sample code for javax.swing.JComponent.paint(java.awt.Graphics) definition code for javax.swing.JComponent.paint(java.awt.Graphics) , paintChildren sample code for javax.swing.JComponent.paintChildren(java.awt.Graphics) definition code for javax.swing.JComponent.paintChildren(java.awt.Graphics) , paintComponent sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(int, int, int, int) definition code for javax.swing.JComponent.paintImmediately(int, int, int, int) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) definition code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) , print sample code for javax.swing.JComponent.print(java.awt.Graphics) definition code for javax.swing.JComponent.print(java.awt.Graphics) , printAll sample code for javax.swing.JComponent.printAll(java.awt.Graphics) definition code for javax.swing.JComponent.printAll(java.awt.Graphics) , printBorder sample code for javax.swing.JComponent.printBorder(java.awt.Graphics) definition code for javax.swing.JComponent.printBorder(java.awt.Graphics) , printChildren sample code for javax.swing.JComponent.printChildren(java.awt.Graphics) definition code for javax.swing.JComponent.printChildren(java.awt.Graphics) , printComponent sample code for javax.swing.JComponent.printComponent(java.awt.Graphics) definition code for javax.swing.JComponent.printComponent(java.awt.Graphics) , processComponentKeyEvent sample code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) , processKeyBinding sample code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) definition code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) , processMouseEvent sample code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) , putClientProperty sample code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) , removeAncestorListener sample code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) , removeNotify sample code for javax.swing.JComponent.removeNotify() definition code for javax.swing.JComponent.removeNotify() , removeVetoableChangeListener sample code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) , repaint sample code for javax.swing.JComponent.repaint(long, int, int, int, int) definition code for javax.swing.JComponent.repaint(long, int, int, int, int) , repaint sample code for javax.swing.JComponent.repaint(java.awt.Rectangle) definition code for javax.swing.JComponent.repaint(java.awt.Rectangle) , requestDefaultFocus sample code for javax.swing.JComponent.requestDefaultFocus() definition code for javax.swing.JComponent.requestDefaultFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus() definition code for javax.swing.JComponent.requestFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus(boolean) definition code for javax.swing.JComponent.requestFocus(boolean) , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow() definition code for javax.swing.JComponent.requestFocusInWindow() , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow(boolean) definition code for javax.swing.JComponent.requestFocusInWindow(boolean) , resetKeyboardActions sample code for javax.swing.JComponent.resetKeyboardActions() definition code for javax.swing.JComponent.resetKeyboardActions() , reshape sample code for javax.swing.JComponent.reshape(int, int, int, int) definition code for javax.swing.JComponent.reshape(int, int, int, int) , revalidate sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate() , scrollRectToVisible sample code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) definition code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) , setActionMap sample code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) definition code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) , setAlignmentX sample code for javax.swing.JComponent.setAlignmentX(float) definition code for javax.swing.JComponent.setAlignmentX(float) , setAlignmentY sample code for javax.swing.JComponent.setAlignmentY(float) definition code for javax.swing.JComponent.setAlignmentY(float) , setAutoscrolls sample code for javax.swing.JComponent.setAutoscrolls(boolean) definition code for javax.swing.JComponent.setAutoscrolls(boolean) , setBackground sample code for javax.swing.JComponent.setBackground(java.awt.Color) definition code for javax.swing.JComponent.setBackground(java.awt.Color) , setBorder sample code for javax.swing.JComponent.setBorder(javax.swing.border.Border) definition code for javax.swing.JComponent.setBorder(javax.swing.border.Border) , setComponentPopupMenu sample code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) definition code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) , setDebugGraphicsOptions sample code for javax.swing.JComponent.setDebugGraphicsOptions(int) definition code for javax.swing.JComponent.setDebugGraphicsOptions(int) , setDefaultLocale sample code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) definition code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) , setDoubleBuffered sample code for javax.swing.JComponent.setDoubleBuffered(boolean) definition code for javax.swing.JComponent.setDoubleBuffered(boolean) , setEnabled sample code for javax.swing.JComponent.setEnabled(boolean) definition code for javax.swing.JComponent.setEnabled(boolean) , setFocusTraversalKeys sample code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) definition code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) , setFont sample code for javax.swing.JComponent.setFont(java.awt.Font) definition code for javax.swing.JComponent.setFont(java.awt.Font) , setForeground sample code for javax.swing.JComponent.setForeground(java.awt.Color) definition code for javax.swing.JComponent.setForeground(java.awt.Color) , setInheritsPopupMenu sample code for javax.swing.JComponent.setInheritsPopupMenu(boolean) definition code for javax.swing.JComponent.setInheritsPopupMenu(boolean) , setInputMap sample code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) definition code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) , setInputVerifier sample code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) definition code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) , setMaximumSize sample code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) , setNextFocusableComponent sample code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) definition code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) , setOpaque sample code for javax.swing.JComponent.setOpaque(boolean) definition code for javax.swing.JComponent.setOpaque(boolean) , setPreferredSize sample code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) definition code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) , setRequestFocusEnabled sample code for javax.swing.JComponent.setRequestFocusEnabled(boolean) definition code for javax.swing.JComponent.setRequestFocusEnabled(boolean) , setToolTipText sample code for javax.swing.JComponent.setToolTipText(java.lang.String) definition code for javax.swing.JComponent.setToolTipText(java.lang.String) , setTransferHandler sample code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) definition code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) , setUI sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , setVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) definition code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) , unregisterKeyboardAction sample code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) definition code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) , update sample code for javax.swing.JComponent.update(java.awt.Graphics) definition code for javax.swing.JComponent.update(java.awt.Graphics)
 
Methods inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) , add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component) , addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) , areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int) , countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents() , deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event) , doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int) , findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point) , getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) , getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int) , getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point) , getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount() , getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents() , getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component) , getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners() , getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) , getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean) , insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets() , invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate() , isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component) , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) , isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider() , isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet() , layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() , list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int) , list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int) , locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int) , minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize() , paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics) , preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize() , printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics) , processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) , processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent) , remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component) , removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll() , removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) , setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int) , setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) , setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) , transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward() , transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle() , validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree()
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , enableInputMethods sample code for java.awt.Component.enableInputMethods(boolean) definition code for java.awt.Component.enableInputMethods(boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getBackground sample code for java.awt.Component.getBackground() definition code for java.awt.Component.getBackground() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getInputMethodRequests sample code for java.awt.Component.getInputMethodRequests() definition code for java.awt.Component.getInputMethodRequests() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , show sample code for java.awt.Component.show() definition code for java.awt.Component.show() , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

JPopupMenu sample code for javax.swing.JPopupMenu() definition code for javax.swing.JPopupMenu()

public JPopupMenu()
Constructs a JPopupMenu without an "invoker".


JPopupMenu sample code for javax.swing.JPopupMenu(java.lang.String) definition code for javax.swing.JPopupMenu(java.lang.String)

public JPopupMenu(String sample code for java.lang.String definition code for java.lang.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 Detail

setDefaultLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean)

public static void setDefaultLightWeightPopupEnabled(boolean aFlag)
Sets the default value of the lightWeightPopupEnabled property.

Parameters:
aFlag - true if popups can be lightweight, otherwise false
See Also:
getDefaultLightWeightPopupEnabled() sample code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled() , setLightWeightPopupEnabled(boolean) sample code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean)

getDefaultLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled()

public static boolean getDefaultLightWeightPopupEnabled()
Gets the defaultLightWeightPopupEnabled property, which by default is true.

Returns:
the value of the defaultLightWeightPopupEnabled property
See Also:
setDefaultLightWeightPopupEnabled(boolean) sample code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(boolean)

getUI sample code for javax.swing.JPopupMenu.getUI() definition code for javax.swing.JPopupMenu.getUI()

public PopupMenuUI sample code for javax.swing.plaf.PopupMenuUI definition code for javax.swing.plaf.PopupMenuUI  getUI()
Returns the look and feel (L&F) object that renders this component.

Returns:
the PopupMenuUI object that renders this component

setUI sample code for javax.swing.JPopupMenu.setUI(javax.swing.plaf.PopupMenuUI) definition code for javax.swing.JPopupMenu.setUI(javax.swing.plaf.PopupMenuUI)

public void setUI(PopupMenuUI sample code for javax.swing.plaf.PopupMenuUI definition code for javax.swing.plaf.PopupMenuUI  ui)
Sets the L&F object that renders this component.

Parameters:
ui - the new PopupMenuUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

updateUI sample code for javax.swing.JPopupMenu.updateUI() definition code for javax.swing.JPopupMenu.updateUI()

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
See Also:
JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

getUIClassID sample code for javax.swing.JPopupMenu.getUIClassID() definition code for javax.swing.JPopupMenu.getUIClassID()

public String sample code for java.lang.String definition code for java.lang.String  getUIClassID()
Returns the name of the L&F class that renders this component.

Overrides:
getUIClassID sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
the string "PopupMenuUI"
See Also:
JComponent.getUIClassID() sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() , UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

processFocusEvent sample code for javax.swing.JPopupMenu.processFocusEvent(java.awt.event.FocusEvent) definition code for javax.swing.JPopupMenu.processFocusEvent(java.awt.event.FocusEvent)

protected void processFocusEvent(FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  evt)
Description copied from class: Component sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

This method is not called unless focus events are enabled for this component. Focus events are enabled when one of the following occurs:

If focus events are enabled for a Component, the current KeyboardFocusManager determines whether or not a focus event should be dispatched to registered FocusListener objects. If the events are to be dispatched, the KeyboardFocusManager calls the Component's dispatchEvent method, which results in a call to the Component's processFocusEvent method.

If focus events are enabled for a Component, calling the Component's dispatchEvent method with a FocusEvent as the argument will result in a call to the Component's processFocusEvent method regardless of the current KeyboardFocusManager.

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Overrides:
processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
evt - the focus event
See Also:
FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent , FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener , KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager , Component.addFocusListener(java.awt.event.FocusListener) sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , Component.dispatchEvent(java.awt.AWTEvent) sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent)

processKeyEvent sample code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent)

protected void processKeyEvent(KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  evt)
Processes key stroke events such as mnemonics and accelerators.

Overrides:
processKeyEvent sample code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
evt - the key event to be processed
See Also:
KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent , KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener , KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager , DefaultKeyboardFocusManager sample code for java.awt.DefaultKeyboardFocusManager definition code for java.awt.DefaultKeyboardFocusManager , Component.processEvent(java.awt.AWTEvent) sample code for java.awt.Component.processEvent(java.awt.AWTEvent) definition code for java.awt.Component.processEvent(java.awt.AWTEvent) , Component.dispatchEvent(java.awt.AWTEvent) sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , Component.addKeyListener(java.awt.event.KeyListener) sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , Component.isShowing() sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing()

getSelectionModel sample code for javax.swing.JPopupMenu.getSelectionModel() definition code for javax.swing.JPopupMenu.getSelectionModel()

public SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel  getSelectionModel()
Returns the model object that handles single selections.

Returns:
the selectionModel property
See Also:
SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel

setSelectionModel sample code for javax.swing.JPopupMenu.setSelectionModel(javax.swing.SingleSelectionModel) definition code for javax.swing.JPopupMenu.setSelectionModel(javax.swing.SingleSelectionModel)

public void setSelectionModel(SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel  model)
Sets the model object to handle single selections.

Parameters:
model - the new SingleSelectionModel
See Also:
SingleSelectionModel sample code for javax.swing.SingleSelectionModel definition code for javax.swing.SingleSelectionModel

add sample code for javax.swing.JPopupMenu.add(javax.swing.JMenuItem) definition code for javax.swing.JPopupMenu.add(javax.swing.JMenuItem)

public JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  add(JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
Appends the specified menu item to the end of this menu.

Parameters:
menuItem - the JMenuItem to add
Returns:
the JMenuItem added

add sample code for javax.swing.JPopupMenu.add(java.lang.String) definition code for javax.swing.JPopupMenu.add(java.lang.String)

public JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  add(String sample code for java.lang.String definition code for java.lang.String  s)
Creates a new menu item with the specified text and appends it to the end of this menu.

Parameters:
s - the string for the menu item to be added

add sample code for javax.swing.JPopupMenu.add(javax.swing.Action) definition code for javax.swing.JPopupMenu.add(javax.swing.Action)

public JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  add(Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
Appends a new menu item to the end of the menu which dispatches the specified Action object. As of JDK 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

Parameters:
a - the Action to add to the menu
Returns:
the new menu item
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action

createActionComponent sample code for javax.swing.JPopupMenu.createActionComponent(javax.swing.Action) definition code for javax.swing.JPopupMenu.createActionComponent(javax.swing.Action)

protected JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  createActionComponent(Action sample code for javax.swing.Action definition code for javax.swing.Action  a)
Factory method which creates the JMenuItem for Actions added to the JPopupMenu. As of JDK 1.3, this is no longer the preferred method, instead it is recommended to configure a control with an action using setAction, and then adding that control directly to the Container.

Parameters:
a - the Action for the menu item to be added
Returns:
the new menu item
Since:
1.3
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action

createActionChangeListener sample code for javax.swing.JPopupMenu.createActionChangeListener(javax.swing.JMenuItem) definition code for javax.swing.JPopupMenu.createActionChangeListener(javax.swing.JMenuItem)

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createActionChangeListener(JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  b)
Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur. As of JDK 1.3, this is no longer the preferred method for adding Actions to a container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.


remove sample code for javax.swing.JPopupMenu.remove(int) definition code for javax.swing.JPopupMenu.remove(int)

public void remove(int pos)
Removes the component at the specified index from this popup menu.

Overrides:
remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
pos - the position of the item to be removed
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the value of pos < 0, or if the value of pos is greater than the number of items
See Also:
Container.add(java.awt.Component) sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component)

setLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean)

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.

Parameters:
aFlag - false to disable lightweight popups
See Also:
isLightWeightPopupEnabled() sample code for javax.swing.JPopupMenu.isLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.isLightWeightPopupEnabled()

isLightWeightPopupEnabled sample code for javax.swing.JPopupMenu.isLightWeightPopupEnabled() definition code for javax.swing.JPopupMenu.isLightWeightPopupEnabled()

public boolean isLightWeightPopupEnabled()
Gets the lightWeightPopupEnabled property.

Returns:
the value of the lightWeightPopupEnabled property
See Also:
setLightWeightPopupEnabled(boolean) sample code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean) definition code for javax.swing.JPopupMenu.setLightWeightPopupEnabled(boolean)

getLabel sample code for javax.swing.JPopupMenu.getLabel() definition code for javax.swing.JPopupMenu.getLabel()

public String sample code for java.lang.String definition code for java.lang.String  getLabel()
Returns the popup menu's label

Returns:
a string containing the popup menu's label
See Also:
setLabel(java.lang.String) sample code for javax.swing.JPopupMenu.setLabel(java.lang.String) definition code for javax.swing.JPopupMenu.setLabel(java.lang.String)

setLabel sample code for javax.swing.JPopupMenu.setLabel(java.lang.String) definition code for javax.swing.JPopupMenu.setLabel(java.lang.String)

public void setLabel(String sample code for java.lang.String definition code for java.lang.String  label)
Sets the popup menu's label. Different look and feels may choose to display or not display this.

Parameters:
label - a string specifying the label for the popup menu
See Also:
setLabel(java.lang.String) sample code for javax.swing.JPopupMenu.setLabel(java.lang.String) definition code for javax.swing.JPopupMenu.setLabel(java.lang.String)

addSeparator sample code for javax.swing.JPopupMenu.addSeparator() definition code for javax.swing.JPopupMenu.addSeparator()

public void addSeparator()
Appends a new separator at the end of the menu.


insert sample code for javax.swing.JPopupMenu.insert(javax.swing.Action, int) definition code for javax.swing.JPopupMenu.insert(javax.swing.Action, int)

public void insert(Action sample code for javax.swing.Action definition code for javax.swing.Action  a,
                   int index)
Inserts a menu item for the specified Action object at a given position.

Parameters:
a - the Action object to insert
index - specifies the position at which to insert the Action, where 0 is the first
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if index < 0
See Also:
Action sample code for javax.swing.Action definition code for javax.swing.Action

insert sample code for javax.swing.JPopupMenu.insert(java.awt.Component, int) definition code for javax.swing.JPopupMenu.insert(java.awt.Component, int)

public void insert(Component sample code for java.awt.Component definition code for java.awt.Component  component,
                   int index)
Inserts the specified component into the menu at a given position.

Parameters:
component - the Component to insert
index - specifies the position at which to insert the component, where 0 is the first
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if index < 0

addPopupMenuListener sample code for javax.swing.JPopupMenu.addPopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JPopupMenu.addPopupMenuListener(javax.swing.event.PopupMenuListener)

public void addPopupMenuListener(PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
Adds a PopupMenu listener.

Parameters:
l - the PopupMenuListener to add

removePopupMenuListener sample code for javax.swing.JPopupMenu.removePopupMenuListener(javax.swing.event.PopupMenuListener) definition code for javax.swing.JPopupMenu.removePopupMenuListener(javax.swing.event.PopupMenuListener)

public void removePopupMenuListener(PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener  l)
Removes a PopupMenu listener.

Parameters:
l - the PopupMenuListener to remove

getPopupMenuListeners sample code for javax.swing.JPopupMenu.getPopupMenuListeners() definition code for javax.swing.JPopupMenu.getPopupMenuListeners()

public PopupMenuListener sample code for javax.swing.event.PopupMenuListener definition code for javax.swing.event.PopupMenuListener [] getPopupMenuListeners()
Returns an array of all the PopupMenuListeners added to this JMenuItem with addPopupMenuListener().

Returns:
all of the PopupMenuListeners added or an empty array if no listeners have been added
Since:
1.4

addMenuKeyListener sample code for javax.swing.JPopupMenu.addMenuKeyListener(javax.swing.event.MenuKeyListener) definition code for javax.swing.JPopupMenu.addMenuKeyListener(javax.swing.event.MenuKeyListener)

public void addMenuKeyListener(MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  l)
Adds a MenuKeyListener to the popup menu.

Parameters:
l - the MenuKeyListener to be added
Since:
1.5

removeMenuKeyListener sample code for javax.swing.JPopupMenu.removeMenuKeyListener(javax.swing.event.MenuKeyListener) definition code for javax.swing.JPopupMenu.removeMenuKeyListener(javax.swing.event.MenuKeyListener)

public void removeMenuKeyListener(MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  l)
Removes a MenuKeyListener from the popup menu.

Parameters:
l - the MenuKeyListener to be removed
Since:
1.5

getMenuKeyListeners sample code for javax.swing.JPopupMenu.getMenuKeyListeners() definition code for javax.swing.JPopupMenu.getMenuKeyListeners()

public MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener [] getMenuKeyListeners()
Returns an array of all the MenuKeyListeners added to this JPopupMenu with addMenuKeyListener().

Returns:
all of the MenuKeyListeners added or an empty array if no listeners have been added
Since:
1.5

firePopupMenuWillBecomeVisible sample code for javax.swing.JPopupMenu.firePopupMenuWillBecomeVisible() definition code for javax.swing.JPopupMenu.firePopupMenuWillBecomeVisible()

protected void firePopupMenuWillBecomeVisible()
Notifies PopupMenuListeners that this popup menu will become visible.


firePopupMenuWillBecomeInvisible sample code for javax.swing.JPopupMenu.firePopupMenuWillBecomeInvisible() definition code for javax.swing.JPopupMenu.firePopupMenuWillBecomeInvisible()

protected void firePopupMenuWillBecomeInvisible()
Notifies PopupMenuListeners that this popup menu will become invisible.


firePopupMenuCanceled sample code for javax.swing.JPopupMenu.firePopupMenuCanceled() definition code for javax.swing.JPopupMenu.firePopupMenuCanceled()

protected void firePopupMenuCanceled()
Notifies PopupMenuListeners that this popup menu is cancelled.


pack sample code for javax.swing.JPopupMenu.pack() definition code for javax.swing.JPopupMenu.pack()

public void pack()
Lays out the container so that it uses the minimum space needed to display its contents.


setVisible sample code for javax.swing.JPopupMenu.setVisible(boolean) definition code for javax.swing.JPopupMenu.setVisible(boolean)

public void setVisible(boolean b)
Sets the visibility of the popup menu.

Overrides:
setVisible sample code for javax.swing.JComponent.setVisible(boolean) definition code for javax.swing.JComponent.setVisible(boolean) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
b - true to make the popup visible, or false to hide it
See Also:
Component.isVisible() sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible()

isVisible sample code for javax.swing.JPopupMenu.isVisible() definition code for javax.swing.JPopupMenu.isVisible()

public boolean isVisible()
Returns true if the popup menu is visible (currently being displayed).

Overrides:
isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
true if the component is visible, false otherwise
See Also:
Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean)

setLocation sample code for javax.swing.JPopupMenu.setLocation(int, int) definition code for javax.swing.JPopupMenu.setLocation(int, int)

public void setLocation(int x,
                        int y)
Sets the location of the upper left corner of the popup menu using x, y coordinates.

Overrides:
setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
x - the x coordinate of the popup's new position in the screen's coordinate space
y - the y coordinate of the popup's new position in the screen's coordinate space
See Also:
Component.getLocation() sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , Component.setBounds(int, int, int, int) sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int)

getInvoker sample code for javax.swing.JPopupMenu.getInvoker() definition code for javax.swing.JPopupMenu.getInvoker()

public Component sample code for java.awt.Component definition code for java.awt.Component  getInvoker()
Returns the component which is the 'invoker' of this popup menu.

Returns:
the Component in which the popup menu is displayed

setInvoker sample code for javax.swing.JPopupMenu.setInvoker(java.awt.Component) definition code for javax.swing.JPopupMenu.setInvoker(java.awt.Component)

public void setInvoker(Component sample code for java.awt.Component definition code for java.awt.Component  invoker)
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.

Parameters:
invoker - the Component in which the popup menu is displayed

show sample code for javax.swing.JPopupMenu.show(java.awt.Component, int, int) definition code for javax.swing.JPopupMenu.show(java.awt.Component, int, int)

public void show(Component sample code for java.awt.Component definition code for java.awt.Component  invoker,
                 int x,
                 int y)
Displays the popup menu at the position x,y in the coordinate space of the component invoker.

Parameters:
invoker - the component in whose space the popup menu is to appear
x - the x coordinate in invoker's coordinate space at which the popup menu is to be displayed
y - the y coordinate in invoker's coordinate space at which the popup menu is to be displayed

getComponentAtIndex sample code for javax.swing.JPopupMenu.getComponentAtIndex(int) definition code for javax.swing.JPopupMenu.getComponentAtIndex(int)

@Deprecated
public Component sample code for java.awt.Component definition code for java.awt.Component  getComponentAtIndex(int i)
Deprecated. replaced by getComponent(int i)

Returns the component at the specified index.

Parameters:
i - the index of the component, where 0 is the first
Returns:
the Component at that index

getComponentIndex sample code for javax.swing.JPopupMenu.getComponentIndex(java.awt.Component) definition code for javax.swing.JPopupMenu.getComponentIndex(java.awt.Component)

public int getComponentIndex(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Returns the index of the specified component.

Parameters:
c - the Component to find
Returns:
the index of the component, where 0 is the first; or -1 if the component is not found

setPopupSize sample code for javax.swing.JPopupMenu.setPopupSize(java.awt.Dimension) definition code for javax.swing.JPopupMenu.setPopupSize(java.awt.Dimension)

public void setPopupSize(Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  d)
Sets the size of the Popup window using a Dimension object. This is equivalent to setPreferredSize(d).

Parameters:
d - the Dimension specifying the new size of this component.

setPopupSize sample code for javax.swing.JPopupMenu.setPopupSize(int, int) definition code for javax.swing.JPopupMenu.setPopupSize(int, int)

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)).

Parameters:
width - the new width of the Popup in pixels
height - the new height of the Popup in pixels

setSelected sample code for javax.swing.JPopupMenu.setSelected(java.awt.Component) definition code for javax.swing.JPopupMenu.setSelected(java.awt.Component)

public void setSelected(Component sample code for java.awt.Component definition code for java.awt.Component  sel)
Sets the currently selected component, This will result in a change to the selection model.

Parameters:
sel - the Component to select

isBorderPainted sample code for javax.swing.JPopupMenu.isBorderPainted() definition code for javax.swing.JPopupMenu.isBorderPainted()

public boolean isBorderPainted()
Checks whether the border should be painted.

Returns:
true if the border is painted, false otherwise
See Also:
setBorderPainted(boolean) sample code for javax.swing.JPopupMenu.setBorderPainted(boolean) definition code for javax.swing.JPopupMenu.setBorderPainted(boolean)

setBorderPainted sample code for javax.swing.JPopupMenu.setBorderPainted(boolean) definition code for javax.swing.JPopupMenu.setBorderPainted(boolean)

public void setBorderPainted(boolean b)
Sets whether the border should be painted.

Parameters:
b - if true, the border is painted.
See Also:
isBorderPainted() sample code for javax.swing.JPopupMenu.isBorderPainted() definition code for javax.swing.JPopupMenu.isBorderPainted()

paintBorder sample code for javax.swing.JPopupMenu.paintBorder(java.awt.Graphics) definition code for javax.swing.JPopupMenu.paintBorder(java.awt.Graphics)

protected void paintBorder(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Paints the popup menu's border if the borderPainted property is true.

Overrides:
paintBorder sample code for javax.swing.JComponent.paintBorder(java.awt.Graphics) definition code for javax.swing.JComponent.paintBorder(java.awt.Graphics) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
g - the Graphics object
See Also:
JComponent.paint(java.awt.Graphics) sample code for javax.swing.JComponent.paint(java.awt.Graphics) definition code for javax.swing.JComponent.paint(java.awt.Graphics) , JComponent.setBorder(javax.swing.border.Border) sample code for javax.swing.JComponent.setBorder(javax.swing.border.Border) definition code for javax.swing.JComponent.setBorder(javax.swing.border.Border)

getMargin sample code for javax.swing.JPopupMenu.getMargin() definition code for javax.swing.JPopupMenu.getMargin()

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getMargin()
Returns the margin, in pixels, between the popup menu's border and its containees.

Returns:
an Insets object containing the margin values.

paramString sample code for javax.swing.JPopupMenu.paramString() definition code for javax.swing.JPopupMenu.paramString()

protected String sample code for java.lang.String definition code for java.lang.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.

Overrides:
paramString sample code for javax.swing.JComponent.paramString() definition code for javax.swing.JComponent.paramString() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
a string representation of this JPopupMenu.

getAccessibleContext sample code for javax.swing.JPopupMenu.getAccessibleContext() definition code for javax.swing.JPopupMenu.getAccessibleContext()

public AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.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.

Specified by:
getAccessibleContext sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() in interface Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Overrides:
getAccessibleContext sample code for javax.swing.JComponent.getAccessibleContext() definition code for javax.swing.JComponent.getAccessibleContext() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
an AccessibleJPopupMenu that serves as the AccessibleContext of this JPopupMenu

processMouseEvent sample code for javax.swing.JPopupMenu.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.JPopupMenu.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)

public void processMouseEvent(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  event,
                              MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] path,
                              MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager  manager)
This method is required to conform to the MenuElement interface, but it not implemented.

Specified by:
processMouseEvent sample code for javax.swing.MenuElement.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.MenuElement.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) in interface MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
See Also:
MenuElement.processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) sample code for javax.swing.MenuElement.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.MenuElement.processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)

processKeyEvent sample code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.JPopupMenu.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)

public void processKeyEvent(KeyEvent sample code for java.awt.event.KeyEvent definition code for java.awt.event.KeyEvent  e,
                            MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] path,
                            MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.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.

Specified by:
processKeyEvent sample code for javax.swing.MenuElement.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) definition code for javax.swing.MenuElement.processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager) in interface MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
Parameters:
e - a KeyEvent
path - the MenuElement path array
manager - the MenuSelectionManager

menuSelectionChanged sample code for javax.swing.JPopupMenu.menuSelectionChanged(boolean) definition code for javax.swing.JPopupMenu.menuSelectionChanged(boolean)

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.

Specified by:
menuSelectionChanged sample code for javax.swing.MenuElement.menuSelectionChanged(boolean) definition code for javax.swing.MenuElement.menuSelectionChanged(boolean) in interface MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
Parameters:
isIncluded - true if this menu is active, false if it is not
See Also:
MenuElement.menuSelectionChanged(boolean) sample code for javax.swing.MenuElement.menuSelectionChanged(boolean) definition code for javax.swing.MenuElement.menuSelectionChanged(boolean)

getSubElements sample code for javax.swing.JPopupMenu.getSubElements() definition code for javax.swing.JPopupMenu.getSubElements()

public MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.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.

Specified by:
getSubElements sample code for javax.swing.MenuElement.getSubElements() definition code for javax.swing.MenuElement.getSubElements() in interface MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
Returns:
an array of MenuElement objects
See Also:
MenuElement.getSubElements() sample code for javax.swing.MenuElement.getSubElements() definition code for javax.swing.MenuElement.getSubElements()

getComponent sample code for javax.swing.JPopupMenu.getComponent() definition code for javax.swing.JPopupMenu.getComponent()

public Component sample code for java.awt.Component definition code for java.awt.Component  getComponent()
Returns this JPopupMenu component.

Specified by:
getComponent sample code for javax.swing.MenuElement.getComponent() definition code for javax.swing.MenuElement.getComponent() in interface MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement
Returns:
this JPopupMenu object
See Also:
MenuElement.getComponent() sample code for javax.swing.MenuElement.getComponent() definition code for javax.swing.MenuElement.getComponent()

isPopupTrigger sample code for javax.swing.JPopupMenu.isPopupTrigger(java.awt.event.MouseEvent) definition code for javax.swing.JPopupMenu.isPopupTrigger(java.awt.event.MouseEvent)

public boolean isPopupTrigger(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Returns true if the MouseEvent is considered a popup trigger by the JPopupMenu's currently installed UI.

Returns:
true if the mouse event is a popup trigger
Since:
1.3