🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: setting image icons for Leaf nodes in Jtree component

#10696
From: Hongbo Su
Date: Thu, 19 Aug 1999 00:00
48 lines
1916 bytes
This is a multi-part message in MIME format.
--------------63E08140BF6D26448EB5B819
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi, Chitra, don't you need to use a icon file instead of gif file?

Hongbo

Chitra Amarnath wrote:

> 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

--------------63E08140BF6D26448EB5B819
Content-Type: text/x-vcard; charset=us-ascii;
 name="hsu.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Hongbo Su
Content-Disposition: attachment;
 filename="hsu.vcf"

begin:vcard 
n:Su;Hongbo
x-mozilla-html:FALSE
org:Gene Logic Inc.
adr:;;708 Quince Orchard Rd.;Gaithersburg;Maryland;20878;USA
version:2.1
email;internet:hsu@genelogic.com
title:Software Engineer
fn:Hongbo Su
end:vcard

--------------63E08140BF6D26448EB5B819--
Technical Details
Message-ID: <37BC8633.559B5403@genelogic.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37BC28CC.ACEA2D01@enterpriseworks.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a103f5c684bb2ee5
X-Google-Attributes: gid111d45,public
From: Hongbo Su <hsu@genelogic.com>
Subject: Re: setting image icons for Leaf nodes in Jtree component
Date: 1999/08/19
Message-ID: <37BC8633.559B5403@genelogic.com>
X-Deja-AN: 514867416
References: <37BC28CC.ACEA2D01@enterpriseworks.com>
X-Accept-Language: en
Content-Type: multipart/mixed; boundary="------------63E08140BF6D26448EB5B819"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing