Javatpoint Logo
Javatpoint Logo

Java AWT Checkbox

The Checkbox class is used to create a checkbox. It is used to turn an option on (true) or off (false). Clicking on a Checkbox changes its state from "on" to "off" or from "off" to "on".

AWT Checkbox Class Declaration

Java AWT Checkbox Example

Output:

java awt checkbox example 1

Java AWT Checkbox Example with ItemListener

Output:

java awt checkbox example 2



Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA