There is no Bug.java in your example zip. No class even uses the Grid class, so I'm not sure what I'm supposed to be looking at.
From your screenshots though, combined with the , this makes sense as being correct. Assuming you've added the initial FieldSet with new VerticalLayoutData(1, -1) (all width, only the height that is required), you've added the grid with VerticalLayoutData(1,1) (i.e. consume all remaining height and width), and you've explicitly assigned a size for the entire panel, the layout engine has no choice but to do what it has done.
You've give only X pixels to work with for the height. First, handle the fieldset - subtract out the margin M, and the fieldset height, Fh. This leaves you with X - 2M - Fh pixels remaining for the grid and its margin. The same margin again is used, so the grid's height (Gh) only gets Gh = X - 4M - Fh, and clearly as M grows, Gh must shrink, since X and Fh are constants.
If my assumptions are flawed, then I need a real test case - I can only work with what you give me. In the future, please follow the bug template from your very first post - we have this for a reason.
My apologies - you did attach the correct zip, but I say the name (client.zip) and the file in my downloads folder (client.zip), and assumed these were the same things. In fact, your zip was downloaded as client(1).zip, which I failed to notice. That said, please do start with code in your first post so we don't need ask each time.
From reviewing the code, Bug.java has no margins, while BugOk.java has 10px margins - isn't this the reverse of what you intended?
The structure appears to be exactly what I had posted in my last message, which is the correct behavior for this components, based on the space allocated, and the size of the margins - where else could that grid get space to draw if you want 10px above and below both fieldsets, and yet only 300px to fit the whole thing in?
And finally, a suggestion: both VerticalLCs c1 and c2 are unnecessary - instead, add the grid/stockeditor to their FieldSets directly. By default, FieldSet already resizes its children to the available space - it inherits this from SimpleContainer (and if it didn't, it would fail to size the VLC correctly anyway). Removing these won't make a large difference in render/resize times, but you'll gain benefits between many small improvements and easier to read code.
I need Vertical container in fieldset because i have more fields in fieldset. I use ui:binder in project. Here is slightly modified example where is problem.
On printscreen when i use fieldset without margin layout is wrong. If i replace fieldset with framed panel layout is ok.
I think that is bug.