What is the method to expand and collapse nodes in a jtree?



What is the method to expand and collapse nodes in a jtree?..

Answer / Vikrant Nain

"Expanding a node can be done by calling the `expandPathToLevel` method on the JTree object, while collapsing can be achieved using the `collapsePath` method. You would need to provide the correct TreePath for the desired node."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are locale settings?

1 Answers  


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

1 Answers   Ciena,


Why is java not 100% pure oops?

1 Answers  


What does file separator do in java?

1 Answers  


Can a class have more than one object?

1 Answers  


What are the advantages of java over cpp?

1 Answers  


What is an empty class? What functionality does it offer in Java?

1 Answers   Deloitte, EXL, JPMorgan Chase,


Is binary a low level language?

1 Answers  


When super keyword is used?

1 Answers  


What is a parameter in java?

1 Answers  


By what default value is an object reference declared as an instance variable?

1 Answers   Wipro,


Why 1 is not a prime number?

1 Answers  


Categories