Advertisement

06.26.2008 at 10:50PM PDT, ID: 23520692
[x]
Attachment Details

Different Icons for Different Nodes in a JTree

Asked by sandeep1984 in Java Programming Language

Tags: Java Swings

I am setting the Image Icon for the nodes as

UIManager.put("Tree.leafIcon", new ImageIcon(getClass().getResource("/images/a/folder.png")));

I have 2 nodes and I want two different icons for theses two nodes.
In the picture attached, I want to give a different Icon for "Shared Folders" Node.

ThanksStart Free Trial
Attachments:
 
ScreenShot
ScreenShot
 
 
Loading Advertisement...
 
[+][-]06.26.2008 at 11:04PM PDT, ID: 21881233

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: Java Swings
Sign Up Now!
Solution Provided By: sciuriware
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.26.2008 at 11:10PM PDT, ID: 21881256

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.27.2008 at 12:16AM PDT, ID: 21881476

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 12:23AM PDT, ID: 21881496

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628