Class java.awt.CheckboxMenuItem
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.CheckboxMenuItem

java.lang.Object
   |
   +----java.awt.MenuComponent
           |
           +----java.awt.MenuItem
                   |
                   +----java.awt.CheckboxMenuItem

public class CheckboxMenuItem
extends MenuItem
This class produces a checkbox that represents a choice in a menu.

Constructor Index

 o CheckboxMenuItem(String)
Creates the checkbox item with the specified label.

Method Index

 o addNotify()
Creates the peer of the checkbox item.
 o getState()
Returns the state of this MenuItem.
 o paramString()
Returns the parameter String of this button.
 o setState(boolean)
Sets the state of this MenuItem if it is a Checkbox.

Constructors

 o CheckboxMenuItem
  public CheckboxMenuItem(String label)
Creates the checkbox item with the specified label.
Parameters:
label - the button label

Methods

 o addNotify
  public synchronized void addNotify()
Creates the peer of the checkbox item. This peer allows us to change the look of the checkbox item without changing its functionality.
Overrides:
addNotify in class MenuItem
 o getState
  public boolean getState()
Returns the state of this MenuItem. This method is only valid for a Checkbox.
 o setState
  public void setState(boolean t)
Sets the state of this MenuItem if it is a Checkbox.
Parameters:
t - the specified state of the checkbox
 o paramString
  public String paramString()
Returns the parameter String of this button.
Overrides:
paramString in class MenuItem

All Packages  Class Hierarchy  This Package  Previous  Next  Index