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

Chapter 2. SWT Shells > Setting the Shell Icon

2.9. Setting the Shell Icon

Another window element is the window icon. If you examine the parent shell in the ShellDialogExample, you notice that there is a generic "window" icon on the right side of the titlebar. Although this icon does not appear on all platforms, when it does appear the user will almost certainly expect that it reflect the type of application and not be the generic "window" icon.

2.9.1. How do I do that?

Use the setImage( ) method of the Shell class to specify the image you wish to display, as shown in Example 2-11.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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