for (int i = 0; i < rowsToAdd; i++) { Vector tmp = new Vector(); tmp.setSize(columnIdentifiers.size()); dataVector.add(tmp); } fireTableRowsInserted(existingRowCount,rowCount-1);
addExtraRows(rowsToAdd, columnIdentifiers.size()); fireTableRowsInserted(existingRowCount, rowCount - 1);
  public void setRowCount(int rowCount)   {    int existingRowCount = dataVector.size();    if (rowCount < existingRowCount)     {    dataVector.setSize(rowCount);      fireTableRowsDeleted(rowCount,existingRowCount-1);          }    else     {      int rowsToAdd = rowCount - existingRowCount;      for (int i = 0; i < rowsToAdd; i++)         {          Vector tmp = new Vector();          tmp.setSize(columnIdentifiers.size());          dataVector.add(tmp);        }       fireTableRowsInserted(existingRowCount,rowCount-1);    }  }