0

How to use getRoot() method in JTree in Netbeans

I created JTree in class and it works perfectly but I want to print getRoot() and getChildCount() in output

2nd Nov 2020, 2:52 AM
Pritam kumar
Pritam kumar - avatar
1 Odpowiedź
+ 1
Let's suppose that you have a JTree object and it is called tree, the following code will help you to get the root of it: - tree.getModel( ).getRoot( ); I hope this answer helps you.
21st Nov 2020, 12:27 AM
Musaad Alhamami
Musaad Alhamami - avatar