将页面布局分割为3个部分:左半边的导航(navigation),右上边的(listing)列表,右下边的Detail内容。

public   class  NestingSample  implements  EntryPoint  {   
  
    
public void onModuleLoad() {   
        HLayout mainLayout 
= new HLayout();   
        mainLayout.setWidth100();   
        mainLayout.setHeight100();   
  
        Label navigationLabel 
= new Label();   
        navigationLabel.setContents(
"Navigation");   
        navigationLabel.setAlign(Alignment.CENTER);   
        navigationLabel.setOverflow(Overflow.HIDDEN);   
        navigationLabel.setWidth(
"30%");   
        navigationLabel.setShowResizeBar(
true);   
        navigationLabel.setBorder(
"1px solid blue");   
  
        mainLayout.addMember(navigationLabel);   
  
        VLayout vLayout 
= new VLayout();   
        vLayout.setWidth(
"70%");   
  
        Label listingLabel 
= new Label();   
        listingLabel.setContents(
"Listing");   
        listingLabel.setAlign(Alignment.CENTER);   
        listingLabel.setOverflow(Overflow.HIDDEN);   
        listingLabel.setHeight(
"30%");   
        listingLabel.setShowResizeBar(
true);   
        listingLabel.setBorder(
"1px solid blue");   
  
        Label detailsLabel 
= new Label();   
        detailsLabel.setContents(
"Details");   
        detailsLabel.setAlign(Alignment.CENTER);   
        detailsLabel.setOverflow(Overflow.HIDDEN);   
        detailsLabel.setHeight(
"70%");   
        detailsLabel.setBorder(
"1px solid blue");   
  
        vLayout.addMember(listingLabel);   
        vLayout.addMember(detailsLabel);   
  
        mainLayout.addMember(vLayout);   
        mainLayout.draw();   
    }
   
  
}