home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Java AWT

Previous Chapter 23
java.awt.peer Reference
Next
 

MenuItemPeer

Name

MenuItemPeer

[Graphic: Figure from the text]

Description

MenuBarPeer is an interface that defines the basis for menu bars.

Interface Definition

public abstract interface java.awt.peer.MenuItemPeer
   extends java.awt.peer.MenuComponentPeer {
  // Interface Methods
  public abstract void disable(); (Deprecated)
  public abstract void enable(); (Deprecated)
  public abstract void setEnabled (boolean b); (New)
  public abstract void setLabel (String label);
}

Interface Methods

disable

public abstract void disable() (Deprecated)

Description

Disables the menu item's peer so that it is unresponsive to user interactions. Replaced by setEnabled(false).

enable

public abstract void enable() (Deprecated)

Description

Enables the menu item's peer so that it is responsive to user interactions. Replaced by setEnabled(true).

setEnabled

public abstract void setEnabled (boolean b) (New)

Parameters

b

true to enable the peer; false to disable it.

Description

Enables or disables the menu item's peer.

setLabel

public abstract void setLabel (String label)

Parameters

label

New text to appear on the menu item's peer.

Description

Changes the label of the menu item's peer.

See Also

CheckboxMenuItemPeer, MenuComponentPeer, MenuPeer, String


Previous Home Next
MenuComponentPeer Book Index MenuPeer

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java