General Questions about Layouting


I am trying to layout an application and ran into some confusing problems when using Margin.

It is kind a hard to Post the complete code because the application is being scripted via Groovy and then build up by a factory pattern.

I have this structure:


The Tab and the VerticalPanel are set to “sizeFull”, and the Grid’s width is set to 100%.

Here is the problem: The Grid needs a margin for better look-and-feel, and unfortunately only the left,top and bottom margins are rendered correctly.
I had to set the width to 99%, which is kind of a hack and not what I want.

I already inspected the DOM and saw that everything ends in divs in vaadin, alot of them… and somehow the Grid’s Width is calculated wrong…

I already searched this forum, found answers that didn’t help (such as using “padding” instead of margin, calling setMargin() on the Grid etc…

Did anyone ran into problems like this before??
And how did you get rid of them?

Thanks alot,