|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.MenuComponent | +--java.awt.MenuBar
A class that encapsulates the platform's concept of a menu bar bound to a Frame. In order to associate the MenuBar with an actual Frame, the Frame.setMenuBar() method should be called.
Frame.setMenuBar(java.awt.MenuBar)
Constructor Summary | |
MenuBar()
Creates a new menu bar. |
Method Summary | |
Menu |
add(Menu m)
Adds the specified menu to the menu bar. |
void |
addNotify()
Creates the menu bar's peer. |
int |
countMenus()
Counts the number of menus on the menu bar. |
Menu |
getHelpMenu()
Gets the help menu on the menu bar. |
Menu |
getMenu(int i)
Gets the specified menu. |
void |
remove(int index)
Removes the menu located at the specified index from the menu bar. |
void |
remove(MenuComponent m)
Removes the specified menu from the menu bar. |
void |
removeNotify()
Removes the menu bar's peer. |
void |
setHelpMenu(Menu m)
Sets the help menu to the specified menu on the menu bar. |
Methods inherited from class java.awt.MenuComponent |
getFont, getParent, getPeer, paramString, postEvent, setFont, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Constructor Detail |
public MenuBar()
Method Detail |
public void addNotify()
public void removeNotify()
removeNotify
in class MenuComponent
public Menu getHelpMenu()
public void setHelpMenu(Menu m)
m
- the menu to be setpublic Menu add(Menu m)
m
- the menu to be added to the menu barpublic void remove(int index)
index
- the position of the menu to be removedpublic void remove(MenuComponent m)
remove
in interface MenuContainer
m
- the menu to be removedpublic int countMenus()
public Menu getMenu(int i)
i
- the menu to be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |