java Programming Glossary: check_col
Multiple row selection in JTable http://stackoverflow.com/questions/4526779/multiple-row-selection-in-jtable class CheckABunch extends JPanel private static final int CHECK_COL 1 private static final Object DATA One Boolean.TRUE Two Boolean.FALSE.. Class getColumnClass int columnIndex if columnIndex CHECK_COL return getValueAt 0 CHECK_COL .getClass return super.getColumnClass.. columnIndex if columnIndex CHECK_COL return getValueAt 0 CHECK_COL .getClass return super.getColumnClass columnIndex @Override..
Using setValueAt to recreate mutually exclusive check boxes http://stackoverflow.com/questions/7920068/using-setvalueat-to-recreate-mutually-exclusive-check-boxes an sscce . For expedience it simply clears all entries in CHECK_COL sets the new value and conditions the button accordingly. import.. class CheckOne extends JPanel private static final int CHECK_COL 1 private static final Object DATA One Boolean.FALSE Two Boolean.FALSE.. void setValueAt Object aValue int row int col if col CHECK_COL for int r 0 r getRowCount r super.setValueAt false r CHECK_COL..
|