Constructors of Checkbox class
Constructors |
Description |
---|---|
Checkbox() |
Creates a checkbox with no label. |
Checkbox(String label) |
Creates a checkbox with the specified label. |
Checkbox(String label, boolean state |
Creates a checkbox with the given label and sets the initial state. |
Checkbox(String label, boolean state, CheckboxGroup group) |
Creates a checkbox with the specified label, state, and associates it with a CheckboxGroup. |
Checkbox(String label, CheckboxGroup group, boolean state) |
Creates a checkbox with the given label, associates it with the specified CheckboxGroup, and sets the initial state. |
Methods of checkbox class are inherited by two classes:
- java.awt.Component
- java.lang.Object
Java AWT Checkbox
Java AWT (Abstract Window Toolkit) provides a really various set of tools for edifice in writing user interfaces (GUIs), and among these tools is the Checkbox class. Checkboxes are necessary components for user interactions, allowing users to work binary choices easily. In this clause, we’ll search the Checkbox class, its constructors, and methods, and supply examples of creating checkboxes with really different logic.