FillLayout
places its components in a single row or column, forcing them to be the same size. Each components margins can be specified by using a FillData instance for each child. Only 1 component should specify a margin on adjacent sides.
In the next example a {@code Button} placed inside a {@link Viewport} issized to completely fill the browser's content area:
public void onModuleLoad() { Viewport viewport = new Viewport(); viewport.add(new Button("Button 1")); RootPanel.get().add(viewport); } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|