summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/swing/ButtonGroup.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/swing/ButtonGroup.java')
-rw-r--r--libjava/classpath/javax/swing/ButtonGroup.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/libjava/classpath/javax/swing/ButtonGroup.java b/libjava/classpath/javax/swing/ButtonGroup.java
index bea8aea0311..3de1d4b9f16 100644
--- a/libjava/classpath/javax/swing/ButtonGroup.java
+++ b/libjava/classpath/javax/swing/ButtonGroup.java
@@ -43,7 +43,25 @@ import java.util.Vector;
/**
- * DOCUMENT ME!
+ * Logically groups a set of buttons, so that only one of the buttons in
+ * a <code>ButtonGroup</code> can be selected at the same time. If one
+ * button in a <code>ButtonGroup</code> is selected, all other buttons
+ * are automatically deselected.
+ *
+ * While <code>ButtonGroup</code> can be used for all buttons that are derived
+ * from {@link AbstractButton}, it is normally only used for
+ * {@link JRadioButton}s, {@link JRadioButtonMenuItem}s and
+ * {@link JToggleButton}s.
+ *
+ * You could use it for {@link JCheckBox}es, but for the sake of usability
+ * this is strongly discouraged because the common expectation of checkboxes
+ * is that the user is allowed to make multiple selections.
+ *
+ * It makes no sense to put {@link JButton}s or {@link JMenuItem}s in
+ * a <code>ButtonGroup</code> because they don't implement the
+ * <code>selected</code> semantics.
+ *
+ * @author original author unknown
*/
public class ButtonGroup implements Serializable
{
OpenPOWER on IntegriCloud