All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JRadioButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.AbstractButton
|
+----java.awt.swing.JToggleButton
|
+----java.awt.swing.JRadioButton
- public class JRadioButton
- extends JToggleButton
- implements Accessible
An implementation of a radio button.
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.
- See Also:
- ButtonGroup
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.
getAccessibleActionDescription(int)
- Return a description of the specified action of the object.
getAccessibleRole()
- Get the role of this object.
getUIClassID()
- Returns a string that specifies 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 a string that specifies the name of the L&F class
that renders this component.
- Returns:
- String "RadioButtonUI"
- Overrides:
- getUIClassID in class JToggleButton
- See Also:
- getUIClassID, getUI
getAccessibleRole
public AccessibleRole getAccessibleRole()
- Get the role of this object.
- Returns:
- an instance of AccessibleRole describing the role of the object
- Overrides:
- getAccessibleRole in class JToggleButton
- See Also:
- AccessibleRole
getAccessibleActionDescription
public String getAccessibleActionDescription(int i)
- Return a description of the specified action of the object.
- Parameters:
- i - zero-based index of the actions
- Returns:
- a description of the action ("select")
- Overrides:
- getAccessibleActionDescription in class AbstractButton
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature