I created subwindow with undefined content size, so that size of window dependes on content. So size of window in this example depeneds on length of captions in labels. This works as expected.
The problem is that i can not set one component (in this example Button) to fill whole width. The button.setSizeFull() is ignored. Is there any way to achive this without setting size to window?
Window subwindow = new Window("subwindow");
subwindow.setModal(true);
subwindow.center();
subwindow.getContent().setSizeUndefined();
GridLayout gl = new GridLayout(2,2);
subwindow.addComponent(gl);
Button button = new Button("test1");
button.setSizeFull();
gl.addComponent(button, 0,0, 1,0);
gl.addComponent(new Label("-------------test2-------------"), 0,1);
gl.addComponent(new Label("-------------test3-------------"), 1,1);