Java ItemListener Interface
The Java ItemListener is notified whenever you click on the checkbox. It is notified against ItemEvent. The ItemListener interface is found in java.awt.event package. It has only one method: itemStateChanged().
The itemStateChanged() method is invoked automatically whenever you click or unclick on the registered checkbox component.
Java ItemListener Example