Java Swing Tutorials - Herong's Tutorial Examples
∟JCheckBox - Swing Check Box Class
∟javax.swing.JCheckBox and Related Methods
This section describes the javax.swing.JCheckBox class, and its commonly used methods.
javax.swing.JCheckBox - A Swing class representing a UI check box. Some
interesting methods are:
- JCheckBox(String) - Constructor to create a check box with the
specified string displayed next to the check box. The check box is unchecked by default.
- addActionListener(ActionListener) - Method to add an action listener to this check box
to handle action events. A mouse click on this check box will trigger one action event.
- addChangeListener(ChangeListener) - Method to add a change listener to this check box
to handle change events. A mouse click on this check box will trigger many change events.
- addItemListener(ItemListener) - Method to add an item listener to this check box
to handle item events. A mouse click on this check box will trigger one item event.
- setActionCommand(String) - Method to set an action command string to this check box.
- isSelected() - Method to return the state of the check box.
Table of Contents
About This Book
JDK (Java Development Kit)
Introduction of Java Swing Package
Graphics Environment of the Local System
JFrame - Main Frame Class
JLabel - Swing Label Class
JButton - Swing Button Class
►JCheckBox - Swing Check Box Class
►javax.swing.JCheckBox and Related Methods
ActionListener, ChangeListener and ItemListener
isSelected() - Getting State of Check Box
JRadioButton - Swing Radio Button Class
JTextField - Swing Text Field Class
JComboBox - Swing Combo Box Class
Menu Bar, Menus, Menu Items and Listeners
Creating Internal Frames inside the Main Frame
Layout of Components in a Container
LookAndFeel and UIManager
Option Dialog Boxes
JEditorPane - The Editor Pane Class
SwingWorker - The Background Task Worker
AWT (Abstract Windows Toolkit)
Integration with Desktop System
Archived Tutorials
References
Full Version in PDF/EPUB