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

Chapter 9. SWT Layouts

Chapter 9. SWT Layouts

Up until this point, the examples have constructed simple user interfaces that consisted of one, or maybe two, widgets, which were placed directly on the Shell. setBounds( ) was used to control the size and positioning of each widget.

Although this approach works well, it does have its deficiencies. If you run one of the earlier examples and resize the window, you will uncover one of these—the widgets remain fixed in location with respect to the upper lefthand corner of the window and remain the same size. Even if the window is resized so as to cover up essential widgets, they remain fixed in position. This is not how windows usually behave, and your users will expect your programs to behave differently. This has been an issue with graphical environments since inception, and is not confined to SWT. Over the years, there have been many solutions.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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