JCheckBox Class
Package: javax.swing
The JCheckBox
class creates a check box that the user can click (select) to check or clear. Check boxes usually let the user specify a Yes
or No
setting for an option. Figure 5-3 shows a frame with three check boxes.
Figure 5-3
Constructors
Constructor |
Description |
|
Creates a new check box that is initially unchecked. |
|
Creates a new check box that displays the specified text. |
|
Creates a new check box with the specified text. The |
Methods
Method |
Description |
|
Adds an |
|
Adds an |
|
Gets the text displayed by the check box |
|
Returns |
|
Checks the check box if the parameter is |
|
Sets the check box text |
|
Sets the tooltip text that’s displayed if the user rests the mouse over the check box for ... |
Get Java For Dummies Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.