MenuNameMenu
DescriptionThe Menu class represents a group of MenuItem objects. Menus themselves are menu items, allowing you to build multi-level menus. Menus are always attached to MenuBars, which currently can only belong to frames. Class Definition
public class java.awt.Menu extends java.awt.MenuItem implements java.awt.MenuContainer { // Constructors public Menu(); public Menu (String label); public Menu (String label, boolean tearOff); // Instance Methods public synchronized MenuItem add (MenuItem item); public void add (String label); public void addNotify(); public void addSeparator(); public int countItems(); public MenuItem getItem (int index); public int getItemCount(); public void insert (String label, int index); public synchronized void insert (MenuItem menuitem, int index); public void insertSeparator (int index); public boolean isTearOff(); public String paramString(); public synchronized void remove (int index); public synchronized void remove (MenuComponent component); public synchronized void removeAll(); public void removeNotify(); } ConstructorsMenupublic Menu()
public Menu (String label)
public Menu (String label, boolean tearOff)
Instance Methodsaddpublic synchronized MenuItem add (MenuItem item)
public void add (String label)
addNotifypublic void addNotify()
addSeparatorpublic void addSeparator()
countItemspublic int countItems()
getItempublic MenuItem getItem (int index)
getItemCountpublic int getItemCount()
insertpublic void insert (String label, int index)
public synchronized void insert (MenuItem menuitem, int index)
insertSeparatorpublic void insertSeparator (int index)
isTearOffpublic boolean isTearOff()
paramStringpublic String paramString()
removepublic synchronized void remove (int index)
public synchronized void remove (MenuComponent component)
removeAllpublic synchronized void removeAll()
removeNotifypublic void removeNotify()
See AlsoFrame, MenuComponent, MenuContainer, MenuItem, String |
|