I'm using GWT, I'm creating StackLayoutPanel dynamically. For eg. I have 4 or 5 StackLayoutPanels in a VerticalPanel. I set height of StackLayoutPanel in pixels. If i don't set the Height i see only one StackLayoutPanel in the view instead of 4 or 5. I want to see all the panels but don't want to set the Height in pixels.
My code,
StackLayoutPanel stackLayoutPanel = new StackLayoutPanel(Unit.EM);
stackLayoutPanel.setHeight("300px");
List<String> list = Lists.newArrayList();
VerticalPanel vPanel = new VerticalPanel();
for(String value : list) {
stackLayoutPanel.add(new Label("Hello"), new Label("Hai"), 4);
}
vPanel.add(stackLayoutPanel);
Can anyone help me?
Thanks in advance, Gnik