Tag: menuitem separator

Java AWT Menu

May 2, 2011 · 4 min read
**Menus** are very familiar to a programmer in Windows environment. A menu comes with a **pull-down list** of menu items from which user can select one at a time. When a lot of options in different categories exist to be opted by the user, menus are the best choice as they take less space on the frame. A click on the **MenuItem** generates **ActionEvent** and is handled by **ActionListener**. Java AWT Menu and MenuItem are not components as they are not subclasses of **java.awt.Component** class. They are derived from **MenuComponent** class. Following hierarchy illustrates.