Article View: borland.public.jbuilder.java.swing
Article #7831Re: ImageIcon Question
From: James A. Schulz
Date: Wed, 03 Jan 2001 00:44
Date: Wed, 03 Jan 2001 00:44
37 lines
1858 bytes
1858 bytes
Rich,
Both, yes. But when I made an "images" folder, put my gif into that folder
and then used:
ImageIcon icon= new ImageIcon("images/left.gif");
JLabel jLabel1 = new JLabel("test",icon,JLabel.CENTER);
it worked!
James
"Rich Wilkman" <richw@formlessvoid.com> wrote in message
news:3A524E76.97D5D5D3@formlessvoid.com...
> James:
>
> Which browser and does it fail in both?
>
> -Rich
>
> "James A. Schulz" wrote:
>
> > In a Swing applet, I have the following:
> >
> > ImageIcon icon= new ImageIcon("left.gif");
> > JLabel jLabel1 = new JLabel("test",icon,JLabel.CENTER);
> >
> > But, in fact, my JLabel shows nothing. The "left.gif" file is in every
> > possible folder (src, classes etc.), but still it does not show in the
> > label. It is a very small image 10x20 and only uses black an white.
What
> > am I doing wrong?
> >
> > thanks,
> >
> > James
>
Technical Details
Message-ID:
<92tsf6$iqt10@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news-x.support.nl!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mailReferences:
<92sltv$qpr4@bornews.inprise.com> <3A524E76.97D5D5D3@formlessvoid.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,863e9e7787441cf9 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-02 16:41:48 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news-x.support.nl!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mail From: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: ImageIcon Question Date: Tue, 2 Jan 2001 18:44:04 -0600 Organization: Another Netscape Collabra Server User Lines: 39 Message-ID: <92tsf6$iqt10@bornews.inprise.com> References: <92sltv$qpr4@bornews.inprise.com> <3A524E76.97D5D5D3@formlessvoid.com> Reply-To: "James A. Schulz" <jaschulz@wiseware.com> NNTP-Posting-Host: user-vcautgu.dsl.mindspring.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200