Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Jtree with setRootVisible

Posted on 2005-05-09
7
Medium Priority
?
733 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:nphnhi
  • 5
7 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 150 total points
ID: 13958336
setShowsRootHandles(true);
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13958354
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).
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13958363
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Naeemg
ID: 13958547
may this is because of your operating system (if windows then windxp ) problem.
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13958672
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.
0
 

Author Comment

by:nphnhi
ID: 13959630
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 :)
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13959665
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.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month21 days, 2 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question