import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
public class TopBarWithBackground extends HLayout{
public TopBarWithBackground(){
setWidth("100%");
setHeight("20");
ToolStrip topBar = new ToolStrip();
topBar.setBackgroundImage("backgrounds/leather.jpg");
Label title = new Label("Digit chased.");
topBar.addMember(title);
topBar.addFill(); //以后添加内容靠右
Label userInfo = new Label("Welcome admin.");
topBar.addMember(userInfo);
addMember(topBar);
}
}