Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Layout Managers

A layout manager is a Java object associated with a particular component, almost always a background component. The layout manager controls the components contained within the component the layout manager is associated with. In other words, if a frame holds a panel, and the panel holds a button, the panel’s layout manager controls the size and placement of the button, while the frame’s layout manager controls the size and placement of the panel. The button, on the other hand, doesn’t need a layout manager because the button isn’t holding other components.

image with no caption

If a panel holds five things, even if those five things each have their own layout managers, the size and location of the five things in the panel are all controlled by the panel’s layout manager. If those five things, in turn, hold other things, then those other things are placed according to the layout manager of the thing holding them.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial