Skip to content

Instantly share code, notes, and snippets.

@deepaksinghvi
Created July 17, 2012 15:56
Show Gist options
  • Save deepaksinghvi/3130257 to your computer and use it in GitHub Desktop.
Save deepaksinghvi/3130257 to your computer and use it in GitHub Desktop.
gwtLayoutPanelCode
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
LayoutPanel layoutPanel = new LayoutPanel();
rootPanel.add(layoutPanel, 10, 0);
layoutPanel.setSize("430px", "290px");
Label lblName = new Label("Name");
layoutPanel.add(lblName);
layoutPanel.setWidgetLeftWidth(lblName, 40.0, Unit.PX, 56.0, Unit.PX);
layoutPanel.setWidgetTopHeight(lblName, 50.0, Unit.PX, 16.0, Unit.PX);
TextBox nameTextBox = new TextBox();
layoutPanel.add(nameTextBox);
layoutPanel.setWidgetLeftWidth(nameTextBox, 83.0, Unit.PX, 108.0, Unit.PX);
layoutPanel.setWidgetTopHeight(nameTextBox, 38.0, Unit.PX, 28.0, Unit.PX);
Label lblDob = new Label("DOB");
layoutPanel.add(lblDob);
layoutPanel.setWidgetLeftWidth(lblDob, 40.0, Unit.PX, 56.0, Unit.PX);
layoutPanel.setWidgetTopHeight(lblDob, 129.0, Unit.PX, 16.0, Unit.PX);
DateBox dobDateBox = new DateBox();
layoutPanel.add(dobDateBox);
layoutPanel.setWidgetLeftWidth(dobDateBox, 80.0, Unit.PX, 150.0, Unit.PX);
layoutPanel.setWidgetTopHeight(dobDateBox, 118.0, Unit.PX, 28.0, Unit.PX);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment