public void columnSelectionChanged(ListSelectionEvent e){
  if (e.getValueIsAdjusting()) {
    return;
  }
  ListSelectionModel selectionModel=(ListSelectionModel)e.getSource();
  DataSet dataSet=getDataSet();
  dataSet.clearSelection();
  if (!getRowSelectionAllowed()) {
    for (int i=0; i < dataSet.getNumColumns(); i++) {
      if (selectionModel.isSelectedIndex(i + 2)) {
        dataSet.setSelected(dataSet.getVariable(i),true);
      }
    }
  }
}

public void columnSelectionChanged ( ListSelectionEvent e ) { if ( e . getValueIsAdjusting ( ) ) { return ; } ListSelectionModel selectionModel = ( ListSelectionModel ) e . getSource ( ) ; DataSet dataSet = getDataSet ( ) ; dataSet . clearSelection ( ) ; if ( ! getRowSelectionAllowed ( ) ) { for ( int i = 0 ; i < dataSet . getNumColumns ( ) ; i ++ ) { if ( selectionModel . isSelectedIndex ( i + 2 ) ) { dataSet . setSelected ( dataSet . getVariable ( i ) , true ) ; } } } }
sets the selection of columns in the model to what ' s in the display .
