<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.CheckboxGroup
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Checkbox.html#_top_">Previous</a>  <a href="java.awt.CheckboxMenuItem.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.CheckboxGroup
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.CheckboxGroup
</pre>
<hr>
<dl>
  <dt> public class <b>CheckboxGroup</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The <code>CheckboxGroup</code> class is used to group together 
 a set of <code>Checkbox</code> buttons. 
 <p>
 Exactly one check box button in a <code>CheckboxGroup</code> can 
 be in the "on" state at any given time. Pushing any 
 button sets its state to "on" and forces any other button that 
 is in the "on" state into the "off" state. 
 <p>
 The following code example produces a new check box group,
 with three check boxes: 
 <p>
 <hr><blockquote><pre>
 setLayout(new GridLayout(3, 1));
 CheckboxGroup cbg = new CheckboxGroup();
 add(new Checkbox("one", cbg, true));
 add(new Checkbox("two", cbg, false));
 add(new Checkbox("three", cbg, false));
 </pre></blockquote><hr>
 <p>
 This image depicts the check box group created by this example:
 <p>
 <img src="images-awt/CheckboxGroup-1.gif"
 ALIGN=center HSPACE=10 VSPACE=7> 
 <p>
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Checkbox.html#_top_">Checkbox</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#CheckboxGroup()"><b>CheckboxGroup</b></a>()
  <dd>  Creates a new instance of <code>CheckboxGroup</code>.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getCurrent()"><b>getCurrent</b></a>()
  <dd>  
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSelectedCheckbox()"><b>getSelectedCheckbox</b></a>()
  <dd>  Gets the current choice from this check box group.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setCurrent(java.awt.Checkbox)"><b>setCurrent</b></a>(Checkbox)
  <dd>  
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setSelectedCheckbox(java.awt.Checkbox)"><b>setSelectedCheckbox</b></a>(Checkbox)
  <dd>  Sets the currently selected check box in this group
 to be the specified check box.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns a string representation of this check box group,
 including the value of its current selection.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="CheckboxGroup"></a>
<a name="CheckboxGroup()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>CheckboxGroup</b>
<pre>
 public CheckboxGroup()
</pre>
<dl>
  <dd> Creates a new instance of <code>CheckboxGroup</code>.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getSelectedCheckbox()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSelectedCheckbox"><b>getSelectedCheckbox</b></a>
<pre>
 public <a href="java.awt.Checkbox.html#_top_">Checkbox</a> getSelectedCheckbox()
</pre>
<dl>
  <dd> Gets the current choice from this check box group.
 The current choice is the check box in this  
 group that is currently in the "on" state, 
 or <code>null</code> if all check boxes in the
 group are off.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the check box that is currently in the
                 "on" state, or <code>null</code>.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Checkbox.html#_top_">Checkbox</a>, <a href="#setSelectedCheckbox">setSelectedCheckbox</a>
  </dl></dd>
</dl>
<a name="getCurrent()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getCurrent"><b>getCurrent</b></a>
<pre>
 public <a href="java.awt.Checkbox.html#_top_">Checkbox</a> getCurrent()
</pre>
<dl>
<dd><b> Note: getCurrent() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>getSelectedCheckbox()</code>.</i>
<p>
</dl>
<a name="setSelectedCheckbox(java.awt.Checkbox)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setSelectedCheckbox"><b>setSelectedCheckbox</b></a>
<pre>
 public void setSelectedCheckbox(<a href="java.awt.Checkbox.html#_top_">Checkbox</a> box)
</pre>
<dl>
  <dd> Sets the currently selected check box in this group
 to be the specified check box.
 This method sets the state of that check box to "on" and 
 sets all other check boxes in the group to be off.
 <p>
 If the check box argument is <code>null</code> or belongs to a 
 different check box group, then this method does nothing.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> box - the <code>Checkbox</code> to set as the
                      current selection.
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Checkbox.html#_top_">Checkbox</a>, <a href="#getSelectedCheckbox">getSelectedCheckbox</a>
  </dl></dd>
</dl>
<a name="setCurrent(java.awt.Checkbox)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setCurrent"><b>setCurrent</b></a>
<pre>
 public synchronized void setCurrent(<a href="java.awt.Checkbox.html#_top_">Checkbox</a> box)
</pre>
<dl>
<dd><b> Note: setCurrent() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>setSelectedCheckbox(Checkbox)</code>.</i>
<p>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns a string representation of this check box group,
 including the value of its current selection.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this check box group.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Checkbox.html#_top_">Previous</a>  <a href="java.awt.CheckboxMenuItem.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
