🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

relative paths for images.

#8321
From: Stephen
Date: Wed, 04 Oct 2000 00:00
17 lines
1091 bytes
Hi,

I have a small application that uses a JTree and a cellrenderer to change
the tree icons.  I want to store my images in an images folder in our class
structure.

How do I specify the location of the images?  If I use a relative path then
this will only work if the user executes the java app from a location that
the image files will get resolved properly.

I don't want to hard code the path either for obvious reasons.

So the question is, how do I point the renderer to the images folder no
matter where the app is run from?

Cheers
Stephen
Technical Details
Message-ID: <39db01dd$0$23087$4db1788e@beta.news.uk.uu.net>
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,f91999e8e575d321,start
X-Google-Attributes: gid111d45,public
From: "Stephen" <stephen.gemmell@cadspace.com>
Subject: relative paths for images.
Date: 2000/10/04
Message-ID: <39db01dd$0$23087$4db1788e@beta.news.uk.uu.net>
X-Deja-AN: 677393797
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Trace: 970654173 beta.news.uk.uu.net 23087 193.130.144.188
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing