1. Converting TreePaths into a JTree stackoverflow.comI am using Java. I have a set of
|
2. TreePath object coderanch.com |
3. Java's JTree (TreePath) coderanch.comWell, this is screwed up! Or at least it seems so. Now here's an example: DefaultMutableTreeNode rNode = new DefaultMutableTreeNode("/"); DefaultMutableTreeNode cNode = null; DefaultTreeModel tModel = new DefaultTreeModel(rNode); DefaultMutableTreeNode rNode2 = new DefaultMutableTreeNode("/"); DefaultMutableTreeNode cNode2 = null; DefaultTreeModel tModel2 = new DefaultTreeModel(rNode2); JTree jt = new JTree(tModel); JTree jt2 = new JTree(tModel2); cNode = new DefaultMutableTreeNode("demo"); cNode2 = new DefaultMutableTreeNode("demo"); ... |
4. Constructing a TreePath? coderanch.comhello, i am using a tree to display a filesystem. the user has the option to rename a file or directory. after editing the valueForPathChanged method is invoked where the second parameter (Object value)contains the new pathname. after changing the name of a directory i want a new treepath with the new diretoryname. example: old path: c:\programme --> treepath: [c:\, c:\programme] ... |
5. How to save a Selected TreePath and reuse later coderanch.comWhat I would like to do is save a SelectedPath from a JTree and after the tree is closed, at some later time, automatically expand the same path in a new tree. The new tree will probably have the same structure but not definitely and that is why I will have a new tree. I thought this would be easy and ... |
6. JTree doesn't return expected value when calling tree.isVisible(treePath) coderanch.comHello everyone I am trying to keep a node expanded programatically but am having no luck. I first set a nodePath to be expanded. Then I get its children. I also want to check to see if the children are expanded. If they are, then I want to keep them expanded as well. The way I am trying to do this ... |
7. TreePath exception coderanch.com |
8. How to display all TreePath's in JTree? java-forums.org[COLOR="DarkGreen"]// declare a Vector to store the result[/COLOR] Vector |