0

Please suggest if it's already been asked, haven't found any yet.

I have a JTable whose rows contain multiple columns of CheckBoxes. I want to group the checkboxes in each row like with JRadioButton, so that if I check a checkbox, all other checkbox in its row are unchecked. How do I implement that?

Where should I add that to my table model?

AbstractTableModel atm= new AbstractTableModel() {
.....
    @Override
    public Object getValueAt(int row, int column) {
    ....
    }
    @Override
    public void setValueAt(Object newVal, int row, int col) {
    ....
    }
}
boreas
  • 1,041
  • 1
  • 15
  • 30
  • 1
    *I have a JTable whose rows contain multiple columns of CheckBoxes.* Could you please be more specific? Do you mean multiple columns per *cell*? It sounds confusing to me. Please consider add a [MCVE](http://stackoverflow.com/help/mcve) that reproduces your problem. – dic19 Sep 23 '14 at 23:20
  • 1
    Users are accustomed to radio buttons for mutually exclusive choices, for [example](http://stackoverflow.com/a/11179669/230513). – trashgod Sep 24 '14 at 00:42
  • each column contains one checkbox. checkbox is the default rendering for boolean. How do I make it radiobutton?? – boreas Sep 24 '14 at 08:53

0 Answers0