All About Class CheckboxMenuItem in AWT in Java

0
30
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share


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);
}
 
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here