Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一棵树和它的一个节点的 TreePath。如何以编程方式选择此节点?JTree 对象的 setSelectionPath 会单独起作用吗?
是的。来自 Java 文档
如果路径的任何组件被隐藏(在折叠的节点下),并且 getExpandsSelectedPaths 为真,则它被暴露(可见)。