Article View: borland.public.jbuilder.java.swing
Article #334using icons
From: GEORGE
Date: Wed, 17 Aug 2005 23:21
Date: Wed, 17 Aug 2005 23:21
10 lines
1305 bytes
1305 bytes
I load icons with ImageIcon("icons/filename.png"). This is fine for my app
because I always run from within JBuilder so I just have to place the icons
directory under the project directory. I think this will most likely not
work if the app was being run from a jar file.
What is the most general way to solve this issue? i.e how to load icons in
a way that is independent of the way the program is run?
TIA
George
Technical Details
Message-ID:
<4303c686$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,873b9a753cc77904,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "GEORGE" <geo@nowhere.net> Newsgroups: borland.public.jbuilder.java.swing Subject: using icons Date: Wed, 17 Aug 2005 19:21:43 -0400 Lines: 12 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 70.21.154.171 Message-ID: <4303c686$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124320902 70.21.154.171 (17 Aug 2005 16:21:42 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail