Article View: borland.public.jbuilder.java.language
Article #16596Re: Adding an image - newbie-ish
From: Surfing Spider
Date: Fri, 29 Jan 1999 00:00
Date: Fri, 29 Jan 1999 00:00
33 lines
1382 bytes
1382 bytes
how about 1.1 images? putting one into a basic applet is easy enough, but
how about onto another container like a panel or canvas?
Vasudevan Srinivasan wrote in message <36A6082B.89E2DAC4@netrisk.com>...
>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:
<78rvst$65o6@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<784lki$dj317@forums.borland.com> <36A6082B.89E2DAC4@netrisk.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,92600df66b3b9c7d X-Google-Attributes: gidf74b3,public From: "Surfing Spider" <dpooley@betalink.net.au> Subject: Re: Adding an image - newbie-ish Date: 1999/01/29 Message-ID: <78rvst$65o6@forums.borland.com> X-Deja-AN: 438280585 References: <784lki$dj317@forums.borland.com> <36A6082B.89E2DAC4@netrisk.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language