Filter « JTree « Java Swing Q&A





1. Hiding/filtering nodes in a JTree?    stackoverflow.com

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 parents. ...

2. Filter JTree    coderanch.com

3. Filtering the JTree Node    coderanch.com

4. filter jtree - keeping all nodes and children of nodes that match criteria    coderanch.com

Hello, and thanks for the welcome. So here is my filter class. I have a tree with a text box at the bottom and as you type, the tree is supposed to filter by node name. This is the filtering tree model: private class FilteredTreeModel extends DefaultTreeModel { private static final long serialVersionUID = 5632874215454365848L; private String filter = ""; /** ...