Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Java
Button _chkbtn= new Button(container,SWT.CHECK);
 gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1,1);   
 _chkbtn.setText("STATUS");
 _chkbtn.setLayoutData(gridData);
Posted
Updated 9-Jan-12 19:45pm
v3

1 solution

The Checkbox get's checked/unchecked when you click it.

To set the state of that checkbox, you need to set it selected:

Button.setSelection(true);
 
Share this answer
 
Comments
vicky patole 10-Jan-12 5:23am    
thanks you are my teacher..great

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900