Java Swing: JCheckBox (copy)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:04 AM on 4/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards

JCheckBox

The _______ class is used to create a checkbox. It is used to turn an option on (true) or off (false). Clicking on a CheckBox changes its state from "on" to "off" or from "off" to "on ".It inherits JToggleButton class.

2
New cards
public class JCheckBox extends JToggleButton implements Accessible

JCheckBox class declaration

3
New cards

JJCheckBox()
JChechBox(String s)
JCheckBox(String text, boolean selected)
JCheckBox(Action a)

Commonly used Constructors in JCheckBox:

4
New cards

JJCheckBox()

Creates an initially unselected check box button with no text, no icon.

5
New cards

JChechBox(String s)

Creates an initially unselected check box with text.

6
New cards

JCheckBox(String text, boolean selected)

Creates a check box with text and specifies whether or not it is initially selected.

7
New cards

JCheckBox(Action a)

Creates a check box where properties are taken from the Action supplied.

8
New cards

AccessibleContext getAccessibleContext()
protected String paramString()

Commonly used Methods in JCheckBox:

9
New cards

AccessibleContext getAccessibleContext()

It is used to get the AccessibleContext associated with this JCheckBox.

10
New cards

protected String paramString()

It returns a string representation of this JCheckBox.

11
New cards

JRadioButton

The _______ class is used to create a radio button. It is used to choose one option from multiple options. It is widely used in exam systems or quiz. It should be added in ButtonGroup to select one radio button only.

12
New cards
public class JRadioButton extends JToggleButton implements Accessible

JRadioButton class declaration

13
New cards

JRadioButton()
JRadioButton(String s)
JRadioButton(String s, boolean selected)

Commonly used Constructors in JRadioButton:

14
New cards

JRadioButton()

Creates an unselected radio button with no text.

15
New cards

JRadioButton(String s)

Creates an unselected radio button with specified text.

16
New cards

JRadioButton(String s, boolean selected)

Creates a radio button with the specified text and selected status.

17
New cards

void setText(String s)
String getText()
void setEnabled(boolean b)
void setIcon(Icon b)
Icon getIcon()
void setMnemonic(int a)
void addActionListener(ActionListener a)

Commonly used Methods in JRadioButton:

18
New cards

void setText(String s)

It is used to set specified text on button.

19
New cards

String getText()

It is used to return the text of the button.

20
New cards

void setEnabled(boolean b)

It is used to enable or disable the button.

21
New cards

void setIcon(Icon b)

It is used to set the specified Icon on the button.

22
New cards

Icon getIcon()

It is used to get the Icon of the button.

23
New cards

void setMnemonic(int a)

It is used to set the mnemonic on the button.

24
New cards

void addActionListener(ActionListener a)

It is used to add the action listener to this object.