private void showColumn(TableColumn column){
  columnModel.removeColumnModelListener(this);
  columnModel.addColumn(column);
  int position=allColumns.indexOf(column);
  int from=columnModel.getColumnCount() - 1;
  int to=0;
  for (int i=position - 1; i > -1; i--) {
    try {
      TableColumn visibleColumn=allColumns.get(i);
      to=columnModel.getColumnIndex(visibleColumn.getHeaderValue()) + 1;
      break;
    }
 catch (    IllegalArgumentException e) {
    }
  }
  columnModel.moveColumn(from,to);
  columnModel.addColumnModelListener(this);
}

private void showColumn ( TableColumn column ) { columnModel . removeColumnModelListener ( this ) ; columnModel . addColumn ( column ) ; int position = allColumns . indexOf ( column ) ; int from = columnModel . getColumnCount ( ) - 1 ; int to = 0 ; for ( int i = position - 1 ; i > - 1 ; i -- ) { try { TableColumn visibleColumn = allColumns . get ( i ) ; to = columnModel . getColumnIndex ( visibleColumn . getHeaderValue ( ) ) + 1 ; break ; } catch ( IllegalArgumentException e ) { } } columnModel . moveColumn ( from , to ) ; columnModel . addColumnModelListener ( this ) ; }
show a hidden column in the table . the column will be positioned at its proper place in the view of the table .
