|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.awt.Component
![]()
![]()
![]()
java.awt.Container
![]()
![]()
![]()
javax.swing.JComponent
![]()
![]()
![]()
javax.swing.AbstractButton
![]()
![]()
![]()
javax.swing.JToggleButton
![]()
![]()
![]()
javax.swing.JRadioButton
, ItemSelectable
, MenuContainer
, Serializable
, Accessible
, SwingConstants

public class JRadioButton


An implementation of a radio button -- an item that can be selected or
deselected, and which displays its state to the user.
Used with a ButtonGroup
object to create a group of buttons
in which only one button at a time can be selected. (Create a ButtonGroup
object and use its add method to include the JRadioButton objects
in the group.)
Note: The ButtonGroup object is a logical grouping -- not a physical grouping. Tocreate a button panel, you should still create aJPanel![]()
![]()
or similar container-object and add a
Border![]()
![]()
to it to set it off from surrounding components.
See How to Use Buttons, Check Boxes, and 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 applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans package.
Please see XMLEncoder
.
ButtonGroup
,
JCheckBox
,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
JRadioButton.AccessibleJRadioButton
This class implements accessibility support for the JRadioButton class. |
Nested classes/interfaces inherited from class javax.swing.JToggleButton ![]() |
|---|
JToggleButton.AccessibleJToggleButton |
Nested classes/interfaces inherited from class javax.swing.AbstractButton ![]() |
|---|
AbstractButton.AccessibleAbstractButton |
Nested classes/interfaces inherited from class javax.swing.JComponent ![]() |
|---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container ![]() |
|---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component ![]() |
|---|
Component.AccessibleAWTComponent |
| Field Summary |
|---|
Fields inherited from class javax.swing.JComponent ![]() |
|---|
accessibleContext |
Fields inherited from class java.awt.Component ![]() |
|---|
BOTTOM_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants ![]() |
|---|
BOTTOM |
Fields inherited from interface java.awt.image.ImageObserver ![]() |
|---|
ABORT |
| Constructor Summary | |
|---|---|
JRadioButton
Creates an initially unselected radio button with no set text. |
|
JRadioButton
Creates a radiobutton where properties are taken from the Action supplied. |
|
JRadioButton
Creates an initially unselected radio button with the specified image but no text. |
|
JRadioButton
Creates a radio button with the specified image and selection state, but no text. |
|
JRadioButton
Creates an unselected radio button with the specified text. |
|
JRadioButton
Creates a radio button with the specified text and selection state. |
|
JRadioButton
Creates a radio button that has the specified text and image, and that is initially unselected. |
|
JRadioButton
Creates a radio button that has the specified text, image, and selection state. |
|
| Method Summary | |
|---|---|
protected void |
configurePropertiesFromAction
Factory method which sets the ActionEvent source's
properties according to values from the Action instance. |
protected PropertyChangeListener |
createActionPropertyChangeListener
Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. |
AccessibleContext |
getAccessibleContext
Gets the AccessibleContext associated with this JRadioButton. |
String |
getUIClassID
Returns the name of the L&F class that renders this component. |
protected String |
paramString
Returns a string representation of this JRadioButton. |
void |
updateUI
Resets the UI property to a value from the current look and feel. |
Methods inherited from class javax.swing.AbstractButton ![]() |
|---|
addActionListener |