Java javax.swing JRadioButton fields, constructors, methods, implement or subclass

Example usage for Java javax.swing JRadioButton fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing JRadioButton.

The text is from its open source code.

Subclass

javax.swing.JRadioButton has subclasses.
Click this link to see all its subclasses.

Constructor

JRadioButton()
Creates an initially unselected radio button with no set text.
JRadioButton(Icon icon)
Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Action a)
Creates a radiobutton where properties are taken from the Action supplied.
JRadioButton(String text)
Creates an unselected radio button with the specified text.
JRadioButton(Icon icon, boolean selected)
Creates a radio button with the specified image and selection state, but no text.
JRadioButton(String text, boolean selected)
Creates a radio button with the specified text and selection state.
JRadioButton(String text, Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(String text, Icon icon, boolean selected)
Creates a radio button that has the specified text, image, and selection state.

Method

voidaddActionListener(ActionListener l)
Adds an ActionListener to the button.
voidaddChangeListener(ChangeListener l)
Adds a ChangeListener to the button.
voidaddItemListener(ItemListener l)
Adds an ItemListener to the checkbox.
voidaddMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
voiddoClick()
Programmatically perform a "click".
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
AccessibleContextgetAccessibleContext()
Gets the AccessibleContext associated with this JRadioButton.
StringgetActionCommand()
Returns the action command for this button.
BordergetBorder()
Returns the border of this component or null if no border is currently set.
ButtonModelgetModel()
Returns the model that this button represents.
StringgetName()
Gets the name of the component.
StringgetText()
Returns the button's text.
ButtonUIgetUI()
Returns the L&F object that renders this component.
booleanisSelected()
Returns the state of the button.
booleanisShowing()
Determines whether this component is showing on screen.
voidputClientProperty(Object key, Object value)
Adds an arbitrary key/value "client property" to this component.
voidsetActionCommand(String actionCommand)
Sets the action command for this button.
voidsetAlignmentX(float alignmentX)
Sets the horizontal alignment.
voidsetBorder(Border border)
Sets the border of this component.
voidsetBounds(int x, int y, int width, int height)
Moves and resizes this component.
voidsetEnabled(boolean b)
Enables (or disables) the button.
voidsetFocusable(boolean focusable)
Sets the focusable state of this Component to the specified value.
voidsetFont(Font font)
Sets the font for this component.
voidsetForeground(Color fg)
Sets the foreground color of this component.
voidsetMnemonic(int mnemonic)
Sets the keyboard mnemonic on the current model.
voidsetModel(ButtonModel newModel)
Sets the model that this button represents.
voidsetName(String name)
Sets the name of the component to the specified string.
voidsetOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
voidsetSelected(boolean b)
Sets the state of the button.
voidsetText(String text)
Sets the button's text.
voidsetToolTipText(String text)
Registers the text to display in a tool tip.