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
Take a look at this implementation: http://www.java2s.com/Code/Java/Swing-Components/InvisibleNodeTreeExample.htm
It creates subclasses of DefaultMutableNode adding a "isVisible" property rather then actually removing/adding nodes from the TreeModel.