Horizontal Layout with two Side by Side Tables and ExpandRatio

Hi,

is there any way to get the following layout to be full sized (whole browser window) and to have table1 to be 200px wide and table2 to take the remaining space? I can’t get this to work… :confused:

...
    @Override
    protected void init(VaadinRequest request) {

        HorizontalLayout layout = new HorizontalLayout();

        Table table1 = new Table("table1", new BeanItemContainer<Bean>(
                Bean.class, Arrays.asList(new Bean[] { new Bean("bean") })));

        Table table2 = new Table("table1", new BeanItemContainer<Bean>(
                Bean.class, Arrays.asList(new Bean[] { new Bean("bean") })));

        table1.setWidth("200px");

        layout.addComponent(table1);
        layout.addComponent(table2);
        layout.setExpandRatio(table2, 1);

        setContent(layout);
    }

...

You’re missing setWidth(“100%”) for the HorizontalLayout and the second table. Both HL and Table have undefined width by default.