void switchTwoColumns ( int columnIndex , int columnToIndex ) { for ( int i = 0 ; i < getRowCount ( ) - 1 ; i ++ ) { Object cellData = getItems ( ) [ i ] [ columnToIndex ] ; getItems ( ) [ i ] [ columnToIndex ] = getItems ( ) [ i ] [ columnIndex ] ; getItems ( ) [ i ] [ columnIndex ] = cellData ; } }
Switch 2 columns with data