Hi,

I am facing a problem with JTree. How can I collapse priviously expanded node(if any), when the user expanded a new node?

Whenever the user expanded new node, it should first collapse priviously expanded node and then expanded the new node ( on which the user clicks).

How can I do it?