🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10687

Setting image icons for the leaf nodes of JTree

#10687
From: Chitra Amarnath
Date: Thu, 19 Aug 1999 00:00
16 lines
1085 bytes
Hi,

I have a jtree component with all the child nodes set. I am trying to
set the icons for the leaf nodes to an image file where the code looks
like this 

DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
renderer.setLeafIcon(new ImageIcon("images/smile.gif"));     
tree.setCellRenderer(renderer);

I have the image file under the webserver root directory. But for some
reason it doesn't show the image icon on the leaf nodes. 

I would really appreciate any help in this regard.

Chitra
Technical Details
Message-ID: <37BC285C.1EB05EA1@enterpriseworks.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,aeb0d0541489f502,start
X-Google-Attributes: gid111d45,public
From: Chitra Amarnath <chitra.amarnath@enterpriseworks.com>
Subject: Setting image icons for the leaf nodes of JTree
Date: 1999/08/19
Message-ID: <37BC285C.1EB05EA1@enterpriseworks.com>
X-Deja-AN: 514727476
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing