Monday, January 31, 2011

GWT DockLayoutPanel not visible

If you have just created a DockLayoutPanel, but you cannot see some of the content, this is because of how a constraint-based layout behaves. You have to put the DockLayoutPanel inside a container that implements ProvidesResize. These include: CellBrowser, DockLayoutPanel, LayoutPanel, RootLayoutPanel, ScrollPanel, SplitLayoutPanel, StackLayoutPanel, and TabLayoutPanel.

Be sure to actually specify dimensions for the container in your stylesheet, or otherwise.

The Dev Guide explains this behavior of constraint-based panels.