--- /home/cpdev/src/classpath/javax/swing/table/DefaultTableColumnModel.java	2005-07-05 17:33:11.000000000 +0000
+++ javax/swing/table/DefaultTableColumnModel.java	2005-06-30 05:35:20.000000000 +0000
@@ -1,5 +1,5 @@
 /* DefaultTableColumnModel.java --
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -119,11 +119,9 @@
    */
   public void addColumn(TableColumn col)
   {
-    if (col == null)
-      throw new IllegalArgumentException("Null 'col' argument.");
     tableColumns.add(col);
     invalidateWidthCache();
-    fireColumnAdded(new TableColumnModelEvent(this, 0, tableColumns.size() - 1));
+    fireColumnAdded(new TableColumnModelEvent(this,0,tableColumns.size()));
   }
 
   /**
@@ -134,10 +132,8 @@
    */
   public void removeColumn(TableColumn col)
   {
-    int index = this.tableColumns.indexOf(col);
-    if (index < 0)
-      return;
-    fireColumnRemoved(new TableColumnModelEvent(this, index, 0));    
+    int index = getColumnIndex(col);
+    fireColumnRemoved(new TableColumnModelEvent(this,index,0));    
     tableColumns.remove(col);
     invalidateWidthCache();
   }
@@ -151,14 +147,10 @@
    */
   public void moveColumn(int i, int j)
   {
-    int columnCount = getColumnCount();
-    if (i < 0 || i >= columnCount)
-      throw new IllegalArgumentException("Index 'i' out of range.");
-    if (j < 0 || j >= columnCount)
-      throw new IllegalArgumentException("Index 'j' out of range.");
-    Object column = tableColumns.remove(i);
-    tableColumns.add(j, column);
-    fireColumnAdded(new TableColumnModelEvent(this, i, j));
+    Object tmp = tableColumns.get(i);
+    tableColumns.set(i, tableColumns.get(j));
+    tableColumns.set(j, tmp);
+    fireColumnAdded(new TableColumnModelEvent(this,i,j));
   }
 
   /**
@@ -190,27 +182,14 @@
   }
 
   /**
-   * Returns the index of the {@link TableColumn} with the given identifier.
+   * getColumnIndex returns index of the specified column
    *
-   * @param identifier  the identifier (<code>null</code> not permitted).
-   * 
-   * @return The index of the {@link TableColumn} with the given identifier.
-   * 
-   * @throws IllegalArgumentException if <code>identifier</code> is 
-   *         <code>null</code> or there is no column with that identifier.
+   * @param identifier identifier of the column
+   * @return int index of the given column
    */
   public int getColumnIndex(Object identifier)
   {
-    if (identifier == null)
-      throw new IllegalArgumentException("Null identifier.");
-    int columnCount = tableColumns.size();
-    for (int i = 0; i < columnCount; i++) 
-    {
-      TableColumn tc = (TableColumn) tableColumns.get(i);
-      if (identifier.equals(tc.getIdentifier()))
-        return i;
-    }
-    throw new IllegalArgumentException("No TableColumn with that identifier.");
+    return tableColumns.indexOf(identifier, 0);
   }
 
   /**
