--- /home/cpdev/src/classpath/javax/swing/table/DefaultTableModel.java	2005-07-02 21:04:09.000000000 +0000
+++ javax/swing/table/DefaultTableModel.java	2005-06-30 05:35:20.000000000 +0000
@@ -61,7 +61,7 @@
   protected Vector dataVector;
 
   /**
-   * Storage for the column identifiers.
+   * columnIdentifiers
    */
   protected Vector columnIdentifiers;
 
@@ -160,7 +160,7 @@
   /**
    * Returns the vector containing the row data for the table.
    * 
-   * @return The data vector.
+   * @returns The data vector.
    */
   public Vector getDataVector() 
   {
@@ -181,11 +181,11 @@
    */
   public void setDataVector(Vector data, Vector columnNames) 
   {
-    if (data == null)
-      dataVector = new Vector();
-    else
-      dataVector = data;
-    setColumnIdentifiers(columnNames);
+    dataVector = data;
+    columnIdentifiers = columnNames;
+    for (int r = 0; r < data.size(); r++) {
+      ((Vector) dataVector.get(r)).setSize(columnNames.size());
+    }          
   }
 
   /**
@@ -281,7 +281,7 @@
    * If <code>rowCount</code> is greater than the current number of rows in
    * the table, new (empty) rows are added.
    * 
-   * @param rowCount the row count.
+   * @param the row count.
    */
   public void setRowCount(int rowCount) 
   {
@@ -319,7 +319,7 @@
       }
     if (columnIdentifiers != null)  
       columnIdentifiers.setSize(columnCount);
-    fireTableStructureChanged();
+    fireTableDataChanged();
   }
 
   /**
@@ -385,7 +385,7 @@
         ((Vector) dataVector.get(i)).add(columnData == null ? null : columnData[i]);
       }
     columnIdentifiers.add(columnName);
-    fireTableStructureChanged();
+    fireTableDataChanged();
   }
 
   /**
@@ -395,10 +395,9 @@
    * @param rowData the row data (<code>null</code> permitted).
    */
   public void addRow(Vector rowData) {
-    int rowIndex = dataVector.size();
     dataVector.add(rowData);
     newRowsAdded(new TableModelEvent(
-      this, rowIndex, rowIndex, -1, TableModelEvent.INSERT)
+      this, dataVector.size(), dataVector.size(), -1, TableModelEvent.INSERT)
     );
   }
 
@@ -451,9 +450,7 @@
     {
       dataVector.insertElementAt(removed.get(i), toIndex);  
     }
-    int firstRow = Math.min(startIndex, toIndex);
-    int lastRow = Math.max(endIndex, toIndex + (endIndex - startIndex));
-    fireTableRowsUpdated(firstRow, lastRow);
+    fireTableDataChanged();
   }
 
   /**
@@ -468,9 +465,8 @@
   }
 
   /**
-   * Returns the number of rows in the model.
-   * 
-   * @return The row count.
+   * getRowCount
+   * @returns int
    */
   public int getRowCount() {
     return dataVector.size();
@@ -490,7 +486,7 @@
    * 
    * @param column the column index.
    * 
-   * @return The column name.
+   * @returns The column name.
    */
   public String getColumnName(int column) {
     String result = "";
@@ -506,8 +502,6 @@
         else
           result = super.getColumnName(column);
       }
-      else
-        result = super.getColumnName(column);
     }
     return result;
   }
@@ -520,7 +514,7 @@
    * @param row the row index.
    * @param column the column index.
    * 
-   * @return <code>true</code> in all cases.
+   * @returns <code>true</code> in all cases.
    */
   public boolean isCellEditable(int row, int column) {
     return true;
@@ -532,8 +526,8 @@
    * @param row the row index.
    * @param column the column index.
    * 
-   * @return The value (<code>Object</code>, possibly <code>null</code>) at 
-   *         the specified cell in the table.
+   * @returns The value (<code>Object</code>, possibly <code>null</code>) at 
+   *          the specified cell in the table.
    */
   public Object getValueAt(int row, int column) {
     return ((Vector) dataVector.get(row)).get(column);
@@ -557,8 +551,8 @@
    * 
    * @param data the data array (<code>null</code> permitted).
    * 
-   * @return A vector (or <code>null</code> if the data array 
-   *         is <code>null</code>).
+   * @returns A vector (or <code>null</code> if the data array 
+   *          is <code>null</code>).
    */
   protected static Vector convertToVector(Object[] data) {
     if (data == null)
@@ -572,10 +566,10 @@
   /**
    * Converts the data array to a <code>Vector</code> of rows.
    * 
-   * @param data the data array (<code>null</code> permitted).
+   * @param the data array (<code>null</code> permitted).
    * 
-   * @return A vector (or <code>null</code> if the data array 
-   *         is <code>null</code>.
+   * @returns A vector (or <code>null</code> if the data array 
+   *          is <code>null</code>.
    */
   protected static Vector convertToVector(Object[][] data) {
     if (data == null)
