JCheckBox Example Java Swing

JCheckBox Example Java Swing


Following is an exclusive program on JCheckBox. The text font in a text field is changed as per the JCheckBox selected by the user. Four JCheckBox objects are created for font name, font style, font size and to close the JFrame. The counterpart of JCheckBox in java.awt is Checkbox.
Example on JCheckBox

JCheckBox

b = Font.BOLD;

You know in AWT Font, the font style comprising Plain, Bold and Italic were declared as static final variables in Font class.