I have a data object represented in a TreeModel, and I\'d like to show only part of it in my JTree--for the sake of argument, say the leaves and their
TreeModel
JTree
Leverage the code you use to build your TreeNode(s) and rebuild the TreeNode(s) only including the elements you want. Set the root node on the TreeModel with the filtered root node.