Javatpoint Logo
Javatpoint Logo

Java AWT MenuItem and Menu

The object of MenuItem class adds a simple labeled menu item on menu. The items used in a menu must belong to the MenuItem or any of its subclass.

The object of Menu class is a pull down menu component which is displayed on the menu bar. It inherits the MenuItem class.

AWT MenuItem class declaration

AWT Menu class declaration

Java AWT MenuItem and Menu Example

Output:

java awt menuitem and menu example 1
Next TopicJava AWT PopupMenu




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA