subwindow layout alignment / refresh problem

I’m putting up a button

main.addComponent(new VisualizationButton(this));

which adds a subwindow on click

public VisualizationButton(LotoApplication app) {
		subwindow = new VisualizationWindow();
...
getApplication().getMainWindow().addWindow(subwindow);

then in the subwindow i set up two buttons

addComponent(show);
		addComponent(close);		
		VerticalLayout layout = (VerticalLayout) getContent();		
		layout.setComponentAlignment(show, Alignment.BOTTOM_RIGHT);
		layout.setComponentAlignment(close, Alignment.BOTTOM_RIGHT);

The result however is the one in the picture, and i can’t seem to make the components align properly no matter what i do. They align properly after closing and readding the subwindow.
11187.png

I been answered in #vaadin. Setting layout.setSizeFull(); // is the answer. I espected that to be default behaviour.