• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. SWT Buttons > Determining CHECK Button Status

6.4. Determining CHECK Button Status

Proper interface design sometimes requires you to programmatically interact with the state of a button. An example is when you need to set a button's state to checked, depending upon a value retrieved from a database or upon the occurrence of some other condition in the application

6.4.1. How do I do that?

The properties of Button are accessible using get and set methods in the JavaBeans paradigm. To programmatically cause a button to be checked, use this code:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint