/** * Inserts a new row into the table. If you want to add multiple rows at once, * use {@link #resize(int, int)} or {@link #resizeRows(int)} as they are more * efficient. * * @param beforeRow the index before which the new row will be inserted * @return the index of the newly-created row * @throws IndexOutOfBoundsException */ @Override public int insertRow(int beforeRow) { // Physically insert the row int index = super.insertRow(beforeRow); numRows++; // Add the columns to the new row for (int i = 0; i < numColumns; i++) { insertCell(index, i); } return index; }
/** * Inserts a new row into the table. If you want to add multiple rows at once, * use {@link #resize(int, int)} or {@link #resizeRows(int)} as they are more * efficient. * * @param beforeRow the index before which the new row will be inserted * @return the index of the newly-created row * @throws IndexOutOfBoundsException */ @Override public int insertRow(int beforeRow) { // Physically insert the row int index = super.insertRow(beforeRow); numRows++; // Add the columns to the new row for (int i = 0; i < numColumns; i++) { insertCell(index, i); } return index; }
/** * Inserts a new row into the table. If you want to add multiple rows at once, * use {@link #resize(int, int)} or {@link #resizeRows(int)} as they are more * efficient. * * @param beforeRow the index before which the new row will be inserted * @return the index of the newly-created row * @throws IndexOutOfBoundsException */ @Override public int insertRow(int beforeRow) { // Physically insert the row int index = super.insertRow(beforeRow); numRows++; // Add the columns to the new row for (int i = 0; i < numColumns; i++) { insertCell(index, i); } return index; }