Search code examples
gwtgwt2docklayoutpanel

GWT: How to add DockLayoutPanel inside another panel? Not the RootLayoutPanel


Is it possible to add DockLayoutPanel inside another panel other than the RootLayoutPanel? If so, how would you do it? I attempted to add it inside HTMLPanel, and only north of the DockLayoutPanel shows. Then I tried it inside LayoutPanel, it failed again.

I thought it would have work for LayoutPanel because RootLayoutPanel is a subclass of LayoutPanel.

Any answers welcome. Thanks,


Solution

  • DockLayoutPanel is a RequiresResize widget, so either you put it inside a ProvidesResize widget (any so called layout panel) or you give it an explicit size.

    See the Using a LayoutPanel without RootLayoutPanel section in http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Recipes