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

Chapter 6. SWT Buttons > Using Images with Buttons

6.11. Using Images with Buttons

Buttons can use more than text to explain to the user the purpose of the button—images can also be used. Those of you familiar with Borland's C++ development environment may recall the popularity of the OK button that displayed a green checkmark image. You can use images associated with buttons to achieve a similar effect in your SWT applications.

6.11.1. How do I do that?

You have already used images in association with ToolItem buttons in Chapter 4. The techniques are the same when using images with the Button class:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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