πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2128

Re: Placing an image on a JPanel

#2128
From: Nabin Thomas
Date: Sat, 26 May 2001 05:04
38 lines
2096 bytes
You can display Images in JPanel by simply overriding the
paintComponent() method.

"Joi Ellis [TeamB]" wrote:

> "SΓΆren Hanisch" <soeren.hanisch@gwi-ag.com> wrote:
> > Hi,
>
> > is it possible to place images ( *.gif) on a JPanel ?
> > I mean without a creating a JButton and placing the image on this one and
> > the placing the JButton on the JPanel.
>
> I stick it in a JLabel and add that to the JPanel.  As I understand it,
> JPanel is just a dumb container, it can't display text, images, etc itself,
> but it can hold other components which can.
>
> --
> Joi Ellis (TeamB)
> No direct email, please.
> For best results, post on news server newsgroups.borland.com!
> Newsgroup Info: http://www.borland.com/newsgroups/guide.html

--
        ***********************************
***************************************************

Nabin Thomas

nabinthomas@hotmail.com

Feel free to contact me thru e-mail or MSN Mssenger
if required but DONOT SPAM

***************************************************
 ***********************************
Technical Details
Message-ID: <3B0F3944.B3999B17@hotmail.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!209.150.97.11!feeder.qis.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b0b6b6e@news.gwi-ag.com> <3b0bb2bd_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,9279ad3f53b831ad
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-05-25 22:52:02 PST
Message-ID: <3B0F3944.B3999B17@hotmail.com>
Date: Sat, 26 May 2001 10:34:04 +0530
From: Nabin Thomas <nabinthomas@hotmail.com>
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: Placing an image on a JPanel
References: <3b0b6b6e@news.gwi-ag.com> <3b0bb2bd_1@dnews>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 202.9.167.237
X-Trace: dnews 990855201 202.9.167.237 (25 May 2001 22:33:21 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!209.150.97.11!feeder.qis.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews