java.awt

Class CheckboxGroup

public class CheckboxGroup extends Object implements Serializable

This class if for combining checkboxes into groups so that only one checkbox in the group can be selected at any one time.
Constructor Summary
CheckboxGroup()
Initializes a new instance of CheckboxGroup.
Method Summary
CheckboxgetCurrent()
Returns the currently selected checkbox, or null if none of the checkboxes in this group are selected.
CheckboxgetSelectedCheckbox()
Returns the currently selected checkbox, or null if none of the checkboxes in this group are selected.
voidsetCurrent(Checkbox selectedCheckbox)
This method sets the specified checkbox to be the selected on in this group, and unsets all others.
voidsetSelectedCheckbox(Checkbox selectedCheckbox)
This method sets the specified checkbox to be the selected on in this group, and unsets all others.
StringtoString()
Returns a string representation of this checkbox group.

Constructor Detail

CheckboxGroup

public CheckboxGroup()
Initializes a new instance of CheckboxGroup.

Method Detail

getCurrent

public Checkbox getCurrent()

Deprecated: This method is deprecated in favor of getSelectedCheckbox().

Returns the currently selected checkbox, or null if none of the checkboxes in this group are selected.

Returns: The selected checkbox.

getSelectedCheckbox

public Checkbox getSelectedCheckbox()
Returns the currently selected checkbox, or null if none of the checkboxes in this group are selected.

Returns: The selected checkbox.

setCurrent

public void setCurrent(Checkbox selectedCheckbox)

Deprecated: This method is deprecated in favor of setSelectedCheckbox().

This method sets the specified checkbox to be the selected on in this group, and unsets all others.

Parameters: selectedCheckbox The new selected checkbox.

setSelectedCheckbox

public void setSelectedCheckbox(Checkbox selectedCheckbox)
This method sets the specified checkbox to be the selected on in this group, and unsets all others.

Parameters: selectedCheckbox The new selected checkbox.

toString

public String toString()
Returns a string representation of this checkbox group.

Returns: A string representation of this checkbox group.