I am creating an JOutline that has rooms, and inside each room has multiple products. You can select an individual product and hit details, but I also need to be able to select check boxes next to multiple products using a checkbox.
I am particularly looking for a way to have the checkbox on the far left of the objects.
Is there any way to do this, or am I better of looking into JXTreeTable?
As discussed here,
Outlinerequires your implementation of theRowModelinterface, which should be passed to yourOutlineModelconstructor.In your implementation of
RowModel, follow the familiarJTableedit/render scheme for a model value of typeBoolean:The
getColumnClass()implementation should returnBoolean.classfor the relevant column.The
isCellEditable()implementation should returntruefor the relevant column.The
getColumnClass()implementation should return the value from the given node inmyModel.The
setValueFor()implementation should update the given node, so the renderer will see the new value when editing concludes.