- SWING Tutorial
- SWING - Home
- SWING - Overview
- SWING - Environment
- SWING - Controls
- SWING - Event Handling
- SWING - Event Classes
- SWING - Event Listeners
- SWING - Event Adapters
- SWING - Layouts
- SWING - Menu
- SWING - Containers
- SWING Useful Resources
- SWING - Quick Guide
- SWING - Useful Resources
- SWING - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
SWING - Menu Classes
As we know that every top-level window has a menu bar associated with it. This menu bar consists of various menu choices available to the end user. Further, each choice contains a list of options, which is called drop-down menus. Menu and MenuItem controls are subclass of MenuComponent class.
Menu Hierarchy
Menu Controls
Sr.No. | Class & Description |
---|---|
1 | JMenuBar
The JMenuBar object is associated with the top-level window. |
2 | JMenuItem
The items in the menu must belong to the JMenuItem or any of its subclass. |
3 | JMenu
The JMenu object is a pull-down menu component which is displayed from the menu bar. |
4 | JCheckboxMenuItem
JCheckboxMenuItem is the subclass of JMenuItem. |
5 | JRadioButtonMenuItem
JRadioButtonMenuItem is the subclass of JMenuItem. |
6 | JPopupMenu
JPopupMenu can be dynamically popped up at a specified position within a component. |
Advertisements