Menu Members

Menu Members

Class Overview | This Package | All Packages

Constructors
Name Description
Menu() Constructs a new menu with an empty label.
Menu(String) Constructs a new menu with the specified label.
Menu(String, boolean) Constructs a new menu with the specified label.

Methods
Name Description
add(MenuItem) Adds the specified menu item to this menu.
add(String) Adds an item with the specified label to this menu.
addNotify() Creates the menu's peer.
addSeparator() Adds a separator line, or a hypen, to the menu at the current position.
countItems() Deprecated.
getItem(int) Gets the item located at the specified index of this menu.
getItemCount() Get the number of items in this menu.
insert(MenuItem, int) Inserts a menu item into this menu at the specified position.
insert(String, int) Inserts a menu item with the specified label into this menu at the specified position.
insertSeparator(int) Inserts a separator at the specified position.
isTearOff() Indicates whether this menu is a tear-off menu.
paramString() Gets the parameter string representing the state of this menu.
remove(int) Removes the menu item at the specified index from this menu.
remove(MenuComponent) Removes the specified menu item from this menu.
removeAll() Removes all items from this menu.
removeNotify() Removes the menu's peer.