Basic Initial Layout

Hi,

I’m an experienced Java developer but a Vaadin newbie.

Trying to setup an initial basic layout as follows:

           Top

Left | Center | Right
Bottom

  • Left and Right to be empty.
  • Top and Bottom will have some content but empty for now.
  • Center should occupy about 75% of the center space and the rest evenly spread out amongst the rest.

One thing I just can’t get my head around is Sizing:

  • I don’t want to use explicit sizing but use percentage instead
  • I want Panels to occupy the max space available so to fill the page

If previous posts tackle this already then please list them for me.

Thanks for the help.

You can use Vertical and HorizontalLayouts with expand ratios. For instance, for the vertical part:

setExpandRatio(top, 1);
setExpandRatio(center, 6); // 75% = 6/(6+1+1)
setExpandRatio(bottom, 1);

set all layouts to full size, and you’re golden.

Yep that did it, Many Thanks!