4.6. Using layout panels

When constructing the container of your Composite widget, you’ll need to consider which panel is best. Quite often that will be a div-based panel such as FlowPanel or a table-based one such as VerticalPanel or the more complicated DockPanel.

Using tables to provide structure may feel rather old school if you’re coming from a design or HTML background. And it is, but we’re talking about using them for the structure of discrete widgets. When it comes to application layout, it’s better to use GWT’s LayoutPanels that provide predictable layout, harnessing the browser layout engine to make them as blisteringly fast as possible (though you could use Layout-Panel’s internal widgets structure if you want).

 

Layout panels ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.