JavaFX8 TreeTableView multiple root elements

TreeItem<FileModel> root = new TreeItem<FileModel>(playlist); treeTblViewFiles.setRoot(root); treeTblViewFiles.setShowRoot(true); 

The above code sets up one root element, but I need to have several so-called root elements with an expandable list of child elements. How can I do it?
Thanks in advance.

+8
javafx-8 treetableview
source share
1 answer

You create a parent root that you do not show.

These parent children can also be the roots that you show.

+10
source share

All Articles