• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set Images for the leaf nodes in the Jtree

 
Nanditha Parripati
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
Java Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder to what kind of SCJD assignment this applies to
 
Roel De Nijs
Sheriff
Posts: 10591
140
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11941
211
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So moved.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to supply your own TreeRenderer.

http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#display
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic