JTree with tristate checkbox - selected parent in relation to children

422 Views Asked by At

How can I realize a JTree with tristate checkbox where selected parent select all children and in the reverse case deselected child parent checkbox became light gray color.

1

There are 1 best solutions below

0
toltegt On

I think that it has already been answered here: How to add checkbox to JTree node to manage multiselection?

This is a fully functional example of what I understand that you're trying to do. Hope this helps!