Article View: borland.public.jbuilder.java.api
Article #568Re: How to include GIF in jar-file
From: Alan Shiers
Date: Tue, 10 Jun 2003 20:47
Date: Tue, 10 Jun 2003 20:47
28 lines
1815 bytes
1815 bytes
See the post under borland.public.jbuilder.java.language
Subject: Re: File Path variations in classes and jars
There I give an example of how you can access any file that is inside a
jar.
Alan
"J. Ebert" wrote:
>
> Right now we use a nice gif to show if a checkbox is activated.
> The code is very simple (and a prototyp):
> if ( IsFarbig ) {
> String dateiname = "c:\\cross_16mal18.gif";
> ImageIcon icon = new ImageIcon( dateiname );
> File f = new File( dateiname );
> if ( f.exists() && !Penabled && this.isSelected() ) {
> this.setIcon( icon );
> }
> else
> this.setIcon( null );
> }
>
> I would like to have the gif in the jar-File that the archive
> builder builds. And I do not know how to reference the gif when
> it is not on the disk.
>
> Anyone can help?
Technical Details
Message-ID:
<3EE643DB.DF71A5AD@hfx.eastlink.ca>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3e803895$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,b0881a9f84e280a7 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-06-10 14:09:55 PST Message-ID: <3EE643DB.DF71A5AD@hfx.eastlink.ca> Date: Tue, 10 Jun 2003 17:47:23 -0300 From: Alan Shiers <ashiers@hfx.eastlink.ca> X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: Re: How to include GIF in jar-file References: <3e803895$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.222.101.2 X-Trace: newsgroups.borland.com 1055278122 24.222.101.2 (10 Jun 2003 13:48:42 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail