All About Class CheckboxMenuItem in AWT in Java



CheckboxMenuItem represents a checkbox that can be included in a menu.Clicking on the checkbox in th emenu changes its state from "ON" to "OFF" or "OFF" to "ON".When a CheckboxMenuItem is clicked, the AWT sends an action event to CheckboxMenuItem's containing frame. The event's target is the checkbox menu  items and its object is the String label of the checkbox.

The structure of the CheckboxMenuItem is given as:

public class java.awt.CheckboxMenuItem extends java.awt.MenuItem{
//constructor
public CheckboxMenuItem(String label);//creates a checkbox with the specified label
//The checkbox is initially set to "OFF".
//methods:
public void addNotify();
public void getState();
public String paramString();
public void setState(boolean t);
}
 
All About Class CheckboxMenuItem in AWT in Java All About Class CheckboxMenuItem in AWT in Java Reviewed by Animesh Chatterjee on December 03, 2018 Rating: 5

No comments:

Powered by Blogger.