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

Chapter 6. SWT Buttons > Creating Check Buttons

6.3. Creating Check Buttons

In the SWT, unlike in SWING and AWT, only a single Button class is used to create buttons of different styles. One such style is the checkbox. Check buttons don't have the appearance of buttons as you usually think of them, and it may take some getting used to the idea of using a single class to represent two vastly different interface elements, especially if you are moving to SWT from AWT or Swing, but once you are accustomed to the concept, it is really convenient.

6.3.1. How do I do that?

The code to create Figure 6-2 is similar to that used to create Figure 6-1, except that the code that creates the buttons has been changed to this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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