Using Multiple Panels
Hello,
I have a problem with GWT using multiple panels.
I have the HTML file with two div elements,with ids mainData1 and
mainData2 and a java file like this:
public class MyProject implements EntryPoint {
private Label firstNameLabel = new Label("First name:");
private TextBox firstNameTextBox = new TextBox();
private Label lastNameLabel = new Label("Last name:");
private TextBox lastNameTextBox = new TextBox();
....
private FlexTable dataFlexTable2 = new FlexTable();
private Label captchaLettersLabel = new Label("Letters are not case-
sensitive");
private VerticalPanel mainPanel2 = new VerticalPanel();
public void onModuleLoad() {
//Assemble data table 1
dataFlexTable1.setWidget(0, 0, firstNameLabel);
dataFlexTable1.setWidget(0, 1, firstNameTextBox);
dataFlexTable1.setWidget(1, 0, lastNameLabel);
dataFlexTable1.setWidget(1, 1, lastNameTextBox);
//Assemble main panel 1
mainPanel1.add(getStartedLabel);
mainPanel1.add(dataFlexTable1);
//Assemble data table 2
dataFlexTable2.setWidget(0, 0, captchaLettersLabel);
//Assemble main panel 2
mainPanel2.add(dataFlexTable2);
// Associate the Main panel 1 with the HTML host page.
RootPanel rootPanelStockList = RootPanel.get("mainData1");
rootPanelStockList.add(mainPanel1);
//RootPanel.get("mailData1").add(mainPanel1);
// Associate the Main panel 2 with the HTML host page.
RootPanel.get("mailData2").add(mainPanel2);
}
}
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home