This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTree Root Icon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree Root Icon" Watch "JTree Root Icon" New topic
Author

JTree Root Icon

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

I am using Christian Schlichtherle's True Zip classes to write a small file compression program. His classes allow for the visualisation of the contents of an archive in JTree form. I use this to allow the user to preview the contents before they decide to unzip the archive.

What I want to do to further enhance the preview JTree is have only the root icon as a Zip icon and the rest of the icons will be different from that one. I did alot of research and could not discover how to do this. I have alot of experience with Renderers, but I was unable to change only the root icon. Would anyone who has experience with JTree class know how to chnage only the root icon?

Your feedback would be greatly appreciated. Thanks.

I H
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
works OK in this (but its a very simple tree)

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

Thank you Michael Dunn
Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190



I now have the JTree root displaying a Zip archive icon.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree Root Icon
 
Similar Threads
Vector to Jtree
JTree
JTree
JTree
JTree