Monday, May 31, 2010

DockPanel - how to maximize center?


I use the following code to create my "screen". I want a MenuBar at
the top and that the content in the middle is always centered:

pnl = new DockPanel ();
pnl_Center = new VerticalPanel ();

pnl_Center.setHorizontalAlignment (VerticalPanel.ALIGN_CENTER);
pnl_Center.setSize("100%", "100%");

pnl.add (mnb,DockPanel.NORTH);
pnl.add (pnl_Center,DockPanel.CENTER);

RootLayoutPanel root = RootLayoutPanel.get();
root.add (pnl);

However, I noticed the following: The north part of pnl is a little
bit heigher than the MenuBar. And: When I add small content to
pnl_Center, its heigher than when I add big content to the center.

How can I achieve that the north part is just as high as the MenuBar?

Thank you

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment