🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9894

Re: JLabel.remove() method

#9894
From: Alan Shiers
Date: Wed, 29 Dec 1999 00:00
23 lines
1588 bytes
Hi:
    That was it!  I don't know why I didn't think of it myself.  Passing
null through the setIcon() method worked.  Thank you for that.  Yet I'm
plagued by this remove(Component c) method.  If this method is supposed to
remove something from a component, which is acting as a container, how
does one specify which component within the container is to be removed?
Take the JLabel for instance.  It can contain two things: text and an
icon.  If I want to remove either of those from the JLabel how is it done
with the remove(Component c) method?
The removeAll() method doesn't seem to want to do anything either. Any
ideas about that?

Alan Shiers

Tor Iver Wilhelmsen wrote:

> Alan Shiers <jshiers@istar.ca> writes:
>
> > I was able to use the same method but with a blank string to also
> > remove the icon image: setIcon(new ImageIcon("")), but I don't think
> > this is how were supposed to remove the icon image, is it?
>
> setIcon(null) is a more likely candidate.
Technical Details
Message-ID: <386A6094.5F596F35@istar.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38691920.18787F2F@istar.ca> <uvh5iqfxr.fsf@sds.no>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,da4570d1bb8d66fa
X-Google-Attributes: gid111d45,public
From: Alan Shiers <jshiers@istar.ca>
Subject: Re: JLabel.remove() method
Date: 1999/12/29
Message-ID: <386A6094.5F596F35@istar.ca>
X-Deja-AN: 566217191
Content-Transfer-Encoding: 7bit
References: <38691920.18787F2F@istar.ca> <uvh5iqfxr.fsf@sds.no>
To: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing