SWING Menu Classes

Advertisements


As we know that every top-level window has a menu bar associated with it. This menu bar consist of various menu choices available to the end user. Further each choice contains list of options which is called drop down menus. Menu and MenuItem controls are subclass of MenuComponent class.

Menu Hiearchy

Swing Menu Hiearchy

Menu Controls

Sr. No.Control & Description
1JMenuBar
The JMenuBar object is associated with the top-level window.
2JMenuItem
The items in the menu must belong to the JMenuItem or any of its subclass.
3JMenu
The JMenu object is a pull-down menu component which is displayed from the menu bar.
4JCheckboxMenuItem
JCheckboxMenuItem is subclass of JMenuItem.
5JRadioButtonMenuItem
JRadioButtonMenuItem is subclass of JMenuItem.
6JPopupMenu
JPopupMenu can be dynamically popped up at a specified position within a component.


Advertisements
Advertisements