public void hideColumn(Object columnName){
  if (columnName == null) {
    return;
  }
  for (int i=0; i < columnModel.getColumnCount(); i++) {
    TableColumn column=columnModel.getColumn(i);
    if (columnName.equals(column.getHeaderValue())) {
      hideColumn(column);
      break;
    }
  }
}

public void hideColumn ( Object columnName ) { if ( columnName == null ) { return ; } for ( int i = 0 ; i < columnModel . getColumnCount ( ) ; i ++ ) { TableColumn column = columnModel . getColumn ( i ) ; if ( columnName . equals ( column . getHeaderValue ( ) ) ) { hideColumn ( column ) ; break ; } } }
hide a column from view in the table .
