Button button = new Button("Insert 1 Row", new ClickHandler() {
public void onClick(ClickEvent event) {
try {
int row = Integer.parseInt(rowBox.getText());
FlexTable headerTable = ScrollTableDemo.get().getHeaderTable();
headerTable.insertRow(row);
headerTable.setHTML(row, 0, " ");
ScrollTableDemo.get().getScrollTable().redraw();
} catch (NumberFormatException e) {
Window.alert("Please enter valid integers for the row and column.");
} catch (IndexOutOfBoundsException e) {