Grid grid = new Grid(5, 3);
// Row Index
HorizontalPanel panel1 = new HorizontalPanel();
panel1.add(insertRowButton);
panel1.add(new HTML(" "));
panel1.add(removeRowButton);
rowIndexBox.setWidth("50px");
rowIndexBox.setText("0");
grid.setHTML(0, 0, "<B>Row:</B>");
grid.setWidget(0, 1, rowIndexBox);
grid.setWidget(0, 2, panel1);
// Column Index
HorizontalPanel panel2 = new HorizontalPanel();
panel2.add(insertCellButton);
panel2.add(new HTML(" "));
panel2.add(removeCellButton);
cellIndexBox.setWidth("50px");
cellIndexBox.setText("0");
grid.setHTML(1, 0, "<B>Cell:</B>");
grid.setWidget(1, 1, cellIndexBox);
grid.setWidget(1, 2, panel2);
// HTML string
HorizontalPanel panel3 = new HorizontalPanel();
panel3.add(setTextButton);
panel3.add(new HTML(" "));
panel3.add(setHtmlButton);
textBox.setWidth("200px");
textBox.setText("<B>Hello World</B>");
grid.setHTML(2, 0, "<B>Text:</B>");
grid.setWidget(2, 1, textBox);