API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. ButtonGroup View Source
Author(s)
Jeff Dinkins
Since
Version
1.39 11/17/05
Serial
Hierarchy
 Object
      ButtonGroup
Implements
 Serializable
Subclasses
Description
public class ButtonGroup
  This class is used to create a multiple-exclusion scope for a set of buttons.
See also:   
Constructors
public ButtonGroup ()
Creates a new ButtonGroup.
Methods
Hide/Show inherited methods
public void add (AbstractButton b)
  Adds the button to the group.
public void clearSelection ()
  Clears the selection such that none of the buttons in the ButtonGroup are selected.
public int getButtonCount ()
  Returns the number of buttons in the group.
public Enumeration<AbstractButton> getElements ()
  Returns all the buttons that are participating in this group.
public ButtonModel getSelection ()
  Returns the model of the selected button.
public boolean isSelected (ButtonModel m)
  Returns whether a ButtonModel is selected.
public void remove (AbstractButton b)
  Removes the button from the group.
public void setSelected (ButtonModel m, boolean b)
  Sets the selected value for the ButtonModel.
Fields
Hide/Show inherited fields
protected Vector<AbstractButton> buttons
pack-private ButtonModel selection
The current selection.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar