Link to home
Start Free TrialLog in
Avatar of nphnhi
nphnhi

asked on

Jtree with setRootVisible

Hello,
I have a tree, now if I use setRootVisible(false) to hide the root, and I want if the direct child of this root (level 1) has the childrens (leve 2), the sign (+) will be display before the child level 1. I run some JTree example, but the (+) sign not displayed...
How can I do?
Thank you
ASKER CERTIFIED SOLUTION
Avatar of zzynx
zzynx
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
void setShowsRootHandles(boolean)

Set whether the tree shows handles for its leftmost nodes, letting you expand and collapse the nodes.
The default is false. If the tree doesn't show the root node, then you should invoke setShowsRootHandles(true).
Avatar of Naeemg
Naeemg

may this is because of your operating system (if windows then windxp ) problem.
Thanks for accepting.

For my interest: Could you tell me what you missed in my comment for not awarding it with an A?
For your interest: You can always ask for more explanation if you're not completely satisfied with a comment.
Avatar of nphnhi

ASKER

Infact, I don't know that it isn't satify you because I just made a comment "good answer" :) Sorry, I will do another time for an excellent answer :)
Well, I interpret a "good answer" (or B-grade) as: it's OK, but it could have been better/more specific.
Since it was exactly what you needed, I thought it deserved an A-grade.