ui/src/main/java/ucar/util/prefs/ui/BeanTable.java
public void setSelectedBeans(List want) {
    jtable.getSelectionModel().clearSelection();
    for (Object bean : want) {
      int modelRowIndex = beans.indexOf(bean);
      int viewRowIndex = jtable.convertRowIndexToView(modelRowIndex);

      if (viewRowIndex >= 0) {
        jtable.getSelectionModel().addSelectionInterval(viewRowIndex, viewRowIndex);
      }
    }
  }
public void setSelectedBeans(List want) {
    jtable.getSelectionModel().clearSelection();
    for (Object bean : want) {
      int modelRowIndex = beans.indexOf(bean);
      int viewRowIndex = jtable.convertRowIndexToView(modelRowIndex);

      if (viewRowIndex >= 0) {
        jtable.getSelectionModel().addSelectionInterval(viewRowIndex, viewRowIndex);
      }
    }
  }
public void setSelectedBeans ( List want ) { jtable . getSelectionModel ( ) . clearSelection ( ) ; for ( Object bean : want ) { int modelRowIndex = beans . indexOf ( bean ) ; int viewRowIndex = jtable . convertRowIndexToView ( modelRowIndex ) ; if ( viewRowIndex >= 0 ) { jtable . getSelectionModel ( ) . addSelectionInterval ( viewRowIndex , viewRowIndex ) ; } } }
Set which rows are selected.
must also call setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

@param want select these
Set which rows are selected . must also call setSelectionMode ( ListSelectionModel . MULTIPLE_INTERVAL_SELECTION ) ;