Article View: borland.public.jbuilder.java.language
Article #16802Re: Adding an image - newbie-ish
From: Vasudevan Srinivasan
Date: Wed, 20 Jan 1999 00:00
Date: Wed, 20 Jan 1999 00:00
25 lines
1207 bytes
1207 bytes
Hi,
Take a look at the ImageIcon class.
It has a constructor which can take an URL.
You might need to do something like:
ImageIcon image1 = new ImageIcon("packagedir/imagefile.gif");
Vasu
Daniel R. J. Lind wrote:
> Hi,
>
> Simple one - once you have added an image to your package (I mean added it
> to the top left pane) how do you assign it to variable. I want to be able
> to go:
>
> setImage(imageVariableName);
>
> or something like that so that I can just refer to it by it's variable name.
> I need the method for adding by directory and URL.
>
> Cheers,
>
> Daniel
Technical Details
Message-ID:
<36A6082B.89E2DAC4@netrisk.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<784lki$dj317@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,92600df66b3b9c7d,start X-Google-Attributes: gidf74b3,public From: Vasudevan Srinivasan <vasudevan@netrisk.com> Subject: Re: Adding an image - newbie-ish Date: 1999/01/20 Message-ID: <36A6082B.89E2DAC4@netrisk.com> X-Deja-AN: 434861858 Content-Transfer-Encoding: 7bit References: <784lki$dj317@forums.borland.com> To: "Daniel R. J. Lind" <daniel@synopsys.co.nz> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language