Java AWT

Previous Chapter 19
java.awt Reference
Next
 

CheckboxGroup

Name

CheckboxGroup

[Graphic: Figure from the text]

Description

The CheckboxGroup class provides the means to group multiple Checkbox items into a mutual exclusion set, so that only one checkbox in the set has the value true at any time. The checkbox with the value true is the currently selected checkbox. Mutually exclusive checkboxes usually have a different appearance from regular checkboxes and are also called "radio buttons."

Class Definition

public class java.awt.CheckboxGroup
    extends java.lang.Object
    implements java.io.Serializable {
  
  // Constructors
  public CheckboxGroup();
  
  // Instance Methods
  public Checkbox getCurrent(); (Deprecated)
  public Checkbox getSelectedCheckbox() (New)
  public synchronized void setCurrent (Checkbox checkbox); (Deprecated)
  public synchronized void setSelectedCheckbox (Checkbox checkbox); (New)
  public String toString();
}

Constructors

CheckboxGroup

public CheckboxGroup()

Description

Constructs a CheckboxGroup object.

Instance Methods

getCurrent

public Checkbox getCurrent() (Deprecated)

Returns

The currently selected Checkbox within the CheckboxGroup.

Description

Replaced by the more aptly named getSelectedCheckbox().

getSelectedCheckbox

public Checkbox getSelectedCheckbox() (New)

Returns

The currently selected Checkbox within the CheckboxGroup.

setCurrent

public synchronized void setCurrent (Checkbox checkbox) (Deprecated)

Parameters

checkbox

The Checkbox to select.

Description

Changes the currently selected Checkbox within the CheckboxGroup.

Description

Replaced by setSelectedCheckbox(Checkbox).

setSelectedCheckbox

public synchronized void setSelectedCheckbox (Checkbox checkbox) (New)

Parameters

checkbox

The Checkbox to select.

Description

Changes the currently selected Checkbox within the CheckboxGroup.

toString

public String toString()

Returns

A string representation of the CheckboxGroup object.

Overrides

Object.toString()

See Also

Checkbox, Object, String


Previous Home Next
Checkbox Book Index CheckboxMenuItem

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java
This HTML Help has been published using the chm2web software.