Is there a way to set two root nodes for one TreeView?
I found many example if simple TreeView but there is no useful example for my case.
Is there a way to set two root nodes for one TreeView?
I found many example if simple TreeView but there is no useful example for my case.
No: a tree only has one root node.
To get the effect you want, create a dummy root node and add your two nodes to it. Create the TreeView with the dummy root node and call
tree.setShowRoot(false)
, so the dummy node does not appear.