mainLayout.replaceComponent(secondLayout, firstLayout);
mainLayout.setExpandRatio(firstLayout, 1);
}
}
});
second.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (mainLayout.getComponent(1).equals(firstLayout)) {
mainLayout.replaceComponent(firstLayout, secondLayout);