aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to set Images for the leaf nodes in the Jtree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set Images for the leaf nodes in the Jtree" Watch "How to set Images for the leaf nodes in the Jtree" New topic
Author

How to set Images for the leaf nodes in the Jtree

Nanditha Parripati
Greenhorn

Joined: Jul 20, 2009
Posts: 12
Hi Guys,

I created a Jtree with Hashtable. But i want to set different images for leaf nodes in the Jtree How do i do that. Please any one help me in this.
Gert-Jan den Besten
Ranch Hand

Joined: May 02, 2008
Posts: 56

I wonder to what kind of SCJD assignment this applies to


SCJP 5; SCJD; SCWCD 5.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4908
    
  10

Gert-Jan,

Sometimes people have some difficulties finding the correct forum to post their question So one of the bartenders or sheriffs (people with special powers) will move it to the Swing / AWT / SWT / JFace forum.

Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11278
    
  59

So moved.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

You'll need to supply your own TreeRenderer.

http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#display


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set Images for the leaf nodes in the Jtree
 
Similar Threads
Refresh the LeftSide Jtable When Click On node in rightSide JTree Node
JTree
Checkbox with Jtree
Jtree adding nodes
XML to DOM to JTree