All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.JRadioButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.AbstractButton
|
+----com.sun.java.swing.JToggleButton
|
+----com.sun.java.swing.JRadioButton
- public class JRadioButton
- extends JToggleButton
- implements Accessible
An implementation of a radio button -- an item that can be selected or
deselected, and which displays its state to the user.
Used with ButtonGroup
to create a group of buttons
in which only one button at a time can be selected.
See How to Use Radio Buttons
in The Java Tutorial
for further documentation.
Warning: serialized objects of this class will not be compatible with
future swing releases. The current serialization support is appropriate
for short term storage or RMI between Swing1.0 applications. It will
not be possible to load serialized Swing1.0 objects with future releases
of Swing. The JDK1.2 release of Swing will be the compatibility
baseline for the serialized form of Swing objects.
- See Also:
- ButtonGroup, JCheckBox
-
JRadioButton()
- Creates an initially unselected radio button
with no set text.
-
JRadioButton(Icon)
- Creates an initially unselected radio button
with the specified image but no text.
-
JRadioButton(Icon, boolean)
- Creates a radio button with the specified image
and selection state, but no text.
-
JRadioButton(String)
- Creates an unselected radio button with the specified text.
-
JRadioButton(String, boolean)
- Creates a radio button with the specified text
and selection state.
-
JRadioButton(String, Icon)
- Creates a radio button that has the specified text and image,
and that is initially unselected.
-
JRadioButton(String, Icon, boolean)
- Creates a radio button that has the specified text, image,
and selection state.
-
getAccessibleContext()
- Get the AccessibleContext associated with this JComponent
-
getUIClassID()
- Returns the name of the L&F class
that renders this component.
-
updateUI()
- Notification from the UIFactory that the L&F
has changed.
JRadioButton
public JRadioButton()
- Creates an initially unselected radio button
with no set text.
JRadioButton
public JRadioButton(Icon icon)
- Creates an initially unselected radio button
with the specified image but no text.
- Parameters:
- icon - the image that the button should display
JRadioButton
public JRadioButton(Icon icon,
boolean selected)
- Creates a radio button with the specified image
and selection state, but no text.
- Parameters:
- icon - the image that the button should display
- selected - if true, the button is initially selected;
otherwise, the button is initially unselected
JRadioButton
public JRadioButton(String text)
- Creates an unselected radio button with the specified text.
- Parameters:
- text - the string displayed on the radio button
JRadioButton
public JRadioButton(String text,
boolean selected)
- Creates a radio button with the specified text
and selection state.
- Parameters:
- text - the string displayed on the radio button
- selected - if true, the button is initially selected;
otherwise, the button is initially unselected
JRadioButton
public JRadioButton(String text,
Icon icon)
- Creates a radio button that has the specified text and image,
and that is initially unselected.
- Parameters:
- text - the string displayed on the radio button
- icon - the image that the button should display
JRadioButton
public JRadioButton(String text,
Icon icon,
boolean selected)
- Creates a radio button that has the specified text, image,
and selection state.
- Parameters:
- text - the string displayed on the radio button
- icon - the image that the button should display
updateUI
public void updateUI()
- Notification from the UIFactory that the L&F
has changed.
- Overrides:
- updateUI in class JToggleButton
- See Also:
- updateUI
getUIClassID
public String getUIClassID()
- Returns the name of the L&F class
that renders this component.
- Returns:
- String "RadioButtonUI"
- Overrides:
- getUIClassID in class JToggleButton
- See Also:
- getUIClassID, getUI
getAccessibleContext
public AccessibleContext getAccessibleContext()
- Get the AccessibleContext associated with this JComponent
- Returns:
- the AccessibleContext of this JComponent
- Overrides:
- getAccessibleContext in class JToggleButton
All Packages Class Hierarchy This Package Previous Next Index