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
You should be aware of GlazedLists. It's a fantastic library for doing complex table transformations with little effort. They've also expanded to trees too. It may require a little refactoring of your existing code to get it into the GlazedLists way of working. But check out the demo and the webcasts to see how powerful it is. (It's one of the essential Swing libraries in my view, and it's open source.)