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

public class MenuItem extends MenuComponent implements Accessible

AWT Menu class declaration

public class Menu extends MenuItem implements MenuContainer, Accessible

Java AWT MenuItem and Menu Example

Flash Soon


Output:


Advertisement

Copyright ©2017 Design& develop