I would like a panel in GWT to fill the page without actually having to set the size. Is there a way to do this? Currently I have the following:
public class M
Ben's answer is very good, but is also out of date. A resize handler was necessary in GWT 1.6, but we are at 2.4 now. You can use a DockLayoutPanel to have your content fill the page vertically. See the sample mail app, which uses this panel.
For me it does not work if I just set the width like
panel.setWidth("100%");
The panel is a VerticalPanel that it just got a randomly size that I don't know where it comes from. But what @Ben Bederson commented worked very well for me after I added the line:
panel.setWidth(Window.getClientWidth() + "px");
Just this, nothing else. Thanks