Packages This Package Prev Next Index
public class java.awt.MenuBar extends java.awt.MenuComponent (II-§1.31) implements java.awt.MenuContainer (II-§1.44) { // Constructors public MenuBar(); §1.30.1 // Methods public Menu add(Menu m); §1.30.2 public void addNotify(); §1.30.3 public int countMenus(); §1.30.4 public Menu getHelpMenu(); §1.30.5 public Menu getMenu(int i); §1.30.6 public void remove(int index); §1.30.7 public void remove(MenuComponent m); §1.30.8 public void removeNotify(); §1.30.9 public void setHelpMenu(Menu m); §1.30.10 }This class that encapsulates the platform's concept of a menu bar bound to a Frame.
In order to attach the menu bar to a frame, the setMenuBar method (II-§1.19.28) in class Frame must be called.
This is what a menubar looks like
public MenuBar()
public Menu add(Menu m)
m
-
the menu to be added
public void addNotify()
public int countMenus()
public Menu getHelpMenu()
public Menu getMenu(int i)
i
-
the position of the menu to be returned
public void remove(int index)
index
-
the position of the menu to be removed
public void remove(MenuComponent m)
m
-
the menu component to be removed
public void removeNotify()
public void setHelpMenu(Menu m)
m
-
the help menu
Packages This Package Prev Next IndexJava API Document (HTML generated by dkramer on April 22, 1996)