A MenuBar holds menus. MenuBars are always attached to frames, and displayed on the top line of the Frame. One menu in a MenuBar may be designated a "help" menu.
public class java.awt.MenuBar extends java.awt.MenuComponent implements java.awt.MenuContainer { // Constructors public MenuBar(); // Instance Methods public synchronized Menu add (Menu m); public void addNotify(); public int countMenus(); public void deleteShortcut (MenuShortcut s); public Menu getHelpMenu(); public Menu getMenu (int index); public int getMenuCount(); public MenuItem getShortcutMenuItem (MenuShortcut s); public synchronized void remove (int index); public synchronized void remove (MenuComponent component); public void removeNotify(); public synchronized void setHelpMenu (Menu m); public synchronized Enumeration shortcuts(); }
Constructs a MenuBar object.
A Menu to add to MenuBar.
Item just added.
Adds a new menu to the MenuBar.
Creates MenuBar's peer and peers of contained menus.
The number of menus on the menu bar. Replaced by getMenuCount().
The shortcut to remove.
Removes a menu shortcut.
The menu that was designated the help menu.
The position of the Menu to fetch.
The Menu at the designated position.
The number of menus on the menu bar.
A menu shortcut.
The corresponding menu item.
Finds the MenuItem corresponding to the given MenuShortcut, or null if no match is found.
The position of the Menu to remove.
Removes a Menu from the MenuBar.
The element of the MenuBar to remove.
MenuContainer.remove()
Removes a Menu from the MenuBar.
Destroys the MenuBar peer, and peers for all Menu objects that appear on it.
Menu to designate as the help menu.
Designates a Menu as the MenuBar's help menu.
An Enumeration of MenuShortcut objects.
Returns an Enumeration of all MenuShortcut objects managed by this MenuBar.
Frame, Menu, MenuComponent, MenuContainer