开发者

Java Tree Node selection

开发者 https://www.devze.com 2022-12-13 01:40 出处:网络
I have a tree and a TreePath to one of开发者_Go百科 its nodes. How do I programatically select this node?

I have a tree and a TreePath to one of开发者_Go百科 its nodes. How do I programatically select this node? Will setSelectionPath of the JTree object alone work?


Yes. From the Java Documentation

If any component of the path is hidden (under a collapsed node), and getExpandsSelectedPaths is true it is exposed (made viewable).

0

精彩评论

暂无评论...
验证码 换一张
取 消