grid = new Grid(4, 3);
// Row Index 1
HorizontalPanel panel1 = new HorizontalPanel();
panel1.add(moveRowUpButton);
panel1.add(new HTML(" "));
panel1.add(moveRowDownButton);
panel1.add(new HTML(" "));
panel1.add(reverseRowsButton);
rowIndexBox1.setWidth("50px");
rowIndexBox1.setText("3");
grid.setHTML(0, 0, "<B>Row 1:</B>");
grid.setWidget(0, 1, rowIndexBox1);
grid.setWidget(0, 2, panel1);
// Row Index 2
HorizontalPanel panel2 = new HorizontalPanel();
panel2.add(swapRowsButton);
rowIndexBox2.setWidth("50px");
rowIndexBox2.setText("4");
grid.setHTML(1, 0, "<B>Row 2:</B>");
grid.setWidget(1, 1, rowIndexBox2);
grid.setWidget(1, 2, panel2);
// Column Index
HorizontalPanel panel3 = new HorizontalPanel();
panel3.add(sortColumnButton);
panel3.add(new HTML(" "));
panel3.add(makeSortableButton);
panel3.add(new HTML(" "));
panel3.add(makeUnsortableButton);
columnIndexBox.setWidth("50px");
columnIndexBox.setText("3");
grid.setHTML(2, 0, "<B>Column:</B>");
grid.setWidget(2, 1, columnIndexBox);