Object tmp = tableColumns.get(i); tableColumns.set(i, tableColumns.get(j)); tableColumns.set(j, tmp); fireColumnAdded(new TableColumnModelEvent(this,i,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));
  public void moveColumn(int i, int j)  {    Object tmp = tableColumns.get(i);    tableColumns.set(i, tableColumns.get(j));    tableColumns.set(j, tmp);    fireColumnAdded(new TableColumnModelEvent(this,i,j));  }