Code:
public class RowLayoutNoHeight implementsEntryPoint {
publicvoid onModuleLoad() {
ContentPanelcp = new ContentPanel();
cp.setSize(300,400);
finalLayoutContainer innerPanel = new LayoutContainer();
innerPanel.setBorders(true);
innerPanel.setLayout(newRowLayout(Orientation.HORIZONTAL));
TextfirstText = new Text("First text");
TextsecondText = new Text("Second text");
//Here, innerPanel will not have any height. That is, I don't see the
//text components in the UI
innerPanel.add(firstText,new RowData(1, -1));
innerPanel.add(secondText,new RowData(1, -1));
ViewportviewPort = new Viewport();
cp.add(innerPanel);
viewPort.add(cp);
RootPanel.get().add(viewPort);
}
}