Hello,
This might be a newbie issue, because I just started using vaadin.
The thing that I want to achieve is that the main window is not the entire browsersize (when the browser is maximized), but instead, I want the main window to be centered in the browser, with a specific size, lets say 600x800.
What I have done till now is:
private void buildMainLayout() {
setMainWindow(new Window("Chargebox CIMS Applications"));
VerticalSplitPanel mainVerticalSplitPanel = new VerticalSplitPanel();
Label titleLabel = getTitleLabel();
HorizontalSplitPanel mainHorizontalSplitPanel = getMainHorizontalSplitPanel();
mainVerticalSplitPanel.setSplitPosition(45, Sizeable.UNITS_PIXELS);
mainVerticalSplitPanel.setLocked(true);
// mainVerticalSplitPanel.setHeight("450px");
mainVerticalSplitPanel.setWidth("100%");
mainVerticalSplitPanel.addComponent(titleLabel);
mainVerticalSplitPanel.addComponent(mainHorizontalSplitPanel);
[color=#f60c0c]
getMainWindow().setContent(mainVerticalSplitPanel);
getMainWindow().setHeight("600px");
getMainWindow().setWidth("800px");
getMainWindow().center();
[/color]
}
Why is this not working?