| Package | Description | 
|---|---|
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| javax.swing.event | Provides for events fired by Swing components. | 
| javax.swing.plaf.basic | Provides user interface objects built according to the
Basic look and feel. | 
| javax.swing.plaf.metal | Provides user interface objects built according to
the Java look and feel (once codenamed Metal),
which is the default look and feel. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | JCheckBoxMenuItemA menu item that can be selected or deselected. | 
| class  | JMenuAn implementation of a menu -- a popup window containing
  JMenuItems that
 is displayed when the user selects an item on theJMenuBar. | 
| class  | JMenuBarAn implementation of a menu bar. | 
| class  | JMenuItemAn implementation of an item in a menu. | 
| class  | JPopupMenuAn implementation of a popup menu -- a small window that pops up
 and displays a series of choices. | 
| class  | JRadioButtonMenuItemAn implementation of a radio button menu item. | 
| Modifier and Type | Method and Description | 
|---|---|
| MenuElement[] | MenuSelectionManager. getSelectedPath()Returns the path to the currently selected menu item | 
| MenuElement[] | JMenu. getSubElements()Returns an array of  MenuElements containing the submenu
 for this menu component. | 
| MenuElement[] | JMenuItem. getSubElements()This method returns an array containing the sub-menu
 components for this menu component. | 
| MenuElement[] | JMenuBar. getSubElements()Implemented to be a  MenuElement-- returns the
 menus in this menu bar. | 
| MenuElement[] | MenuElement. getSubElements()This method should return an array containing the sub-elements for the receiving menu element | 
| MenuElement[] | JPopupMenu. getSubElements()Returns an array of  MenuElements containing the submenu
 for this menu component. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | JMenuItem. processKeyEvent(KeyEvent e,
               MenuElement[] path,
               MenuSelectionManager manager)Processes a key event forwarded from the
  MenuSelectionManagerand changes the menu selection,
 if necessary, by usingMenuSelectionManager's API. | 
| void | JMenuBar. processKeyEvent(KeyEvent e,
               MenuElement[] path,
               MenuSelectionManager manager)Implemented to be a  MenuElement-- does nothing. | 
| void | MenuElement. processKeyEvent(KeyEvent event,
               MenuElement[] path,
               MenuSelectionManager manager)Process a key event. | 
| void | JPopupMenu. processKeyEvent(KeyEvent e,
               MenuElement[] path,
               MenuSelectionManager manager)Processes a key event forwarded from the
  MenuSelectionManagerand changes the menu selection,
 if necessary, by usingMenuSelectionManager's API. | 
| void | JMenuItem. processMouseEvent(MouseEvent e,
                 MenuElement[] path,
                 MenuSelectionManager manager)Processes a mouse event forwarded from the
  MenuSelectionManagerand changes the menu
 selection, if necessary, by using theMenuSelectionManager's API. | 
| void | JMenuBar. processMouseEvent(MouseEvent event,
                 MenuElement[] path,
                 MenuSelectionManager manager)Implemented to be a  MenuElement-- does nothing. | 
| void | MenuElement. processMouseEvent(MouseEvent event,
                 MenuElement[] path,
                 MenuSelectionManager manager)Processes a mouse event. | 
| void | JPopupMenu. processMouseEvent(MouseEvent event,
                 MenuElement[] path,
                 MenuSelectionManager manager)This method is required to conform to the
  MenuElementinterface, but it not implemented. | 
| void | MenuSelectionManager. setSelectedPath(MenuElement[] path)Changes the selection in the menu hierarchy. | 
| Modifier and Type | Method and Description | 
|---|---|
| MenuElement[] | MenuDragMouseEvent. getPath()Returns the path to the selected menu item. | 
| MenuElement[] | MenuKeyEvent. getPath()Returns the path to the menu item referenced by this event. | 
| Constructor and Description | 
|---|
| MenuDragMouseEvent(Component source,
                  int id,
                  long when,
                  int modifiers,
                  int x,
                  int y,
                  int clickCount,
                  boolean popupTrigger,
                  MenuElement[] p,
                  MenuSelectionManager m)Constructs a MenuDragMouseEvent object. | 
| MenuDragMouseEvent(Component source,
                  int id,
                  long when,
                  int modifiers,
                  int x,
                  int y,
                  int xAbs,
                  int yAbs,
                  int clickCount,
                  boolean popupTrigger,
                  MenuElement[] p,
                  MenuSelectionManager m)Constructs a MenuDragMouseEvent object. | 
| MenuKeyEvent(Component source,
            int id,
            long when,
            int modifiers,
            int keyCode,
            char keyChar,
            MenuElement[] p,
            MenuSelectionManager m)Constructs a MenuKeyEvent object. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | BasicComboPopupThis is a basic implementation of the  ComboPopupinterface. | 
| class  | BasicInternalFrameTitlePane.SystemMenuBarThis class should be treated as a "protected" inner class. | 
| Modifier and Type | Method and Description | 
|---|---|
| MenuElement[] | BasicMenuItemUI. getPath() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | BasicRadioButtonMenuItemUI. processMouseEvent(JMenuItem item,
                 MouseEvent e,
                 MenuElement[] path,
                 MenuSelectionManager manager) | 
| void | BasicCheckBoxMenuItemUI. processMouseEvent(JMenuItem item,
                 MouseEvent e,
                 MenuElement[] path,
                 MenuSelectionManager manager) | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | MetalComboBoxUI.MetalComboPopupDeprecated. 
 As of Java 2 platform v1.4. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.