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

4.5. Panels

In all the examples so far, we've used the HTML host page and the RootPanel to lay out the widgets and attach them to the screen. Although this approach worked well for our simple forms, it's bound to fail for most real-world applications, as they require more complex layout schemes. This is where panels come into the picture. A GWT panel can be seen as a UI component whose sole purpose is to contain other components (widgets or other panels) and define their layout on the screen. As usual with GWT, you define the panels in your application's Java code base, and work with them just like any other Java object. Looking back at Figure 4-1, you can even see that all the panels are part of the GWT component class hierarchy, and have a well-defined class hierarchy of their own.

In the next few sections, we'll cover some of the more important panels available. We'll continue working on our sample application and show the important role that panels play in the overall architecture of the application.


  

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