Top Description Methods
java.awt.peer

public Interface MenuPeer

extends MenuItemPeer
Known Direct Subinterfaces
java.awt.peer.PopupMenuPeer
Known Direct Implementers
sun.awt.X11.XMenuPeer
Imports
java.awt.Menu, .MenuItem

The peer interface for menus. This is used by Menu. The peer interfaces are intended only for use in porting the AWT. They are not intended for use by application developers, and developers should not implement peers nor invoke any of the peer methods directly on the peer instances.

Method Summary

Modifier and TypeMethod and Description
public void
addItem(MenuItem
the menu item to add
item
)

Adds the specified menu item to the menu.

public void
delItem(int
the index of the item to remove
index
)

Removes the menu item at the specified index.

Inherited from java.awt.peer.MenuItemPeer:
setEnabledsetLabel

Method Detail

addItemback to summary
public void addItem(MenuItem item)

Adds the specified menu item to the menu.

Parameters
item:MenuItem

the menu item to add

See Also
Menu#add(MenuItem)
delItemback to summary
public void delItem(int index)

Removes the menu item at the specified index.

Parameters
index:int

the index of the item to remove

See Also
Menu#remove(int)