![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e753. Getting and Setting the State of a JCheckbox Component// To create a checkbox, see e752 Creating a JCheckbox Component // Get the current state of the checkbox boolean b = checkbox.isSelected(); // Set the state of the checkbox to off checkbox.setSelected(false); // Set the state of the checkbox to on checkbox.setSelected(true);
e754. Adding an Icon to the Label of a JCheckBox Component e755. Customizing the Icons in a JCheckBox Component © 2002 Addison-Wesley. |