// Insert the new row
FixedWidthGrid dataTable = getDataTable();
beforeRow = dataTable.insertRow(beforeRow);
// Set the data in the new row
Student student = STUDENT_DATA.generateStudent();
dataTable.setText(beforeRow, 0, student.getFirstName());
dataTable.setText(beforeRow, 1, student.getLastName());
dataTable.setText(beforeRow, 2, student.getAge() + "");
dataTable.setText(beforeRow, 3, student.isMale() ? "male" : "female");
dataTable.setText(beforeRow, 4, student.getRace());
String color = student.getFavoriteColor();
String colorHtml = "<FONT color=\"" + color + "\">" + color + "</FONT>";
dataTable.setHTML(beforeRow, 5, colorHtml);
dataTable.setText(beforeRow, 6, student.getFavoriteSport());
dataTable.setText(beforeRow, 7, student.getCollege());
dataTable.setText(beforeRow, 8, student.getGraduationYear() + "");
String gpa = student.getGpa() + "";
if (gpa.length() > 4) {
gpa = gpa.substring(0, 4);
}
dataTable.setText(beforeRow, 9, gpa);
dataTable.setText(beforeRow, 10, student.getId() + "");
dataTable.setText(beforeRow, 11, student.getPin() + "");
}