Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


Deven A.
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The setExpandsSelectedPaths(boolean) for class JTree has been added to the JDK 1.3. However, I would like to implement the behavior in 1.2.
Any pointers in that direction would be really appreciated.
Below is the description of this method as given in the
begin quote----
New JTree expandsSelectedPaths Property
When the selection is programatically changed in a JTree, the selected items are made visible (visible meaning all the parent items are expanded). For certain applications this behavior is not desirable,
eg say all nodes of a certain type should be selected regardless of their visibility. This behavior is implemented across JTree and BasicTreeUI, making it tricky to override this behavior. The public methods get/setExpandsSelectedPaths have been added to JTree. If set to false, when the selection changes the nodes are not made visible, the default is true.
End quote----
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic