Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

table height 100%

fach hoch
9 years ago May 29, 2012 10:25pm
lelmarir .
9 years ago May 29, 2012 10:45pm

you must insert the table inside a Layout then call setSizeFull() on the layout and the table, then call setExpandRatio(table, 1f); and set the layout as the window content.

public class TestApplication extends Application {
	@Override
	public void init() {
		Window mainWindow = new Window("Layouttest Application");
		{
			VerticalLayout layout = new VerticalLayout();
			{			
				Table table = new Table();
				table.setSizeFull();
				layout.addComponent(table);
				layout.setExpandRatio(table, 1f);
			}
			layout.setSizeFull();
			mainWindow.setContent(layout);
		}
		setMainWindow(mainWindow);
	}
}
Last updated on May, 29th 2012