I have this “window” to which I want to add two panels side by Side and make then take 40 % and 60% of the window’s width respectively.
The following is the code that I think should do it, but the panel don’t fill up the windoq, sorry if this is too naive, I’m still transitioning from the html world to vaadin.(BTW, TestWindow is a child of the Main Application Window)
public class TestWindow extends Window {
Panel menuPanel;
Panel formPanel;
public TestWindow(){
this.setUpLayout();
}
private void setUpLayout(){
this.setWidth("90%");
this.setHeight("90%");
this.center();
HorizontalLayout layout = new HorizontalLayout();
layout.setSizeFull();
menuPanel = new Panel();
formPanel = new Panel();
menuPanel.setSizeFull();
formPanel.setSizeFull();
menuPanel.setWidth("40%");
formPanel.setWidth("60%");
menuPanel.setHeight("90%");
formPanel.setHeight("90%");
layout.addComponent(menuPanel);
layout.addComponent(formPanel);
this.addComponent(layout);
}
}