tags:

views:

284

answers:

1

I trying to produce a DockLayoutPanel which looks like the example in the Developer's Guide (http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html)

DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
p.addNorth(new HTML("header"), 2);
p.addSouth(new HTML("footer"), 2);
p.addWest(new HTML("navigation"), 10);
p.add(new HTML("some content"));
// I added this:
RootLayoutPanel.get().add(p);

All this code was placed inside the onModuleLoad substituting the sample Eclipse startup code when you create a new GWT app. I'm forcing the standards mode with in the html page. The output looked nothing like the example. I see the text "header,footer,etc" in the proper places but the page is all white, the styling is lost (the white boxes with the blue background).

Am I missing a css or something else really simple that makes it look like the example?
Thanks!

+1  A: 

If you deleted everything in the onModuleLoad of the startup project in Eclipse, then added your own content, it's normal if your page is all white.

The thing is, DockLayoutPanel is only a layout panel so it has no basic style, even with the "standard Google style" enabled.

The blue background with the white boxes were actually the result of the standard style applied to what was originally in the onModuleLoad.

Zwik
Okay, so it's more of a poor example on Google's part than really anything wrong with my code. ;-) Thanks for clearing that up. I wonder if anyone has created a css to save me the work of rolling my own.
mudface
If my answer helped you, you can vote it up ;) or even accept it as the answer to your question! (welcome to StackOverflow!)
Zwik