🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JPanel refresh problem

#9269
From: rwilkman
Date: Mon, 08 May 2000 00:00
42 lines
1723 bytes
Aurelien:

When you add or remove components from a container, you must call
Container.invalidate() and/or Container.validate().  Resizing the
container simply forces these calls.

-Rich

Aurelien Broszniowski wrote:
> 
> Paul Furbacher wrote:
> 
> > Aurelien Broszniowski wrote:
> >
> > > I've got a problem with a JPanel, when I want to update the contents, I
> > > do:
> > >
> > >  jPanel1.removeAll();
> > >  jPanel1.add(new JLabel("Hello"));
> > >
> > > But I need to resize the Frame by hand with my mouse before the JPanel
> > > shows the updates!
> >
> > Have you called "jPanel1.invalidate()"?
> >
> > Paul Furbacher (TeamB)
> 
> No, actually I really did a very simple application with a Frame into which
> there's a JPanel where I want to add and remove components.

-- 
=====
Rich Wilkman
Senior Quality Assurance Engineer
JBuilder Team

If something in this post looks like an opinion, walks like an
opinion and quacks like an opinion, it's mine and not that of
my employer.

If you are reading this from a newsgroup post, don't send mail.
=====
Technical Details
Message-ID: <39174465.3B555951@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3916C2E3.4C184D1B@sensiva.com> <391738B5.5EBFDB4D@bilbo.bio.purdue.edu> <3916CC3E.5B66D947@sensiva.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f01bc2622e0cd022
X-Google-Attributes: gid111d45,public
From: rwilkman <rwilkman@inprise.com>
Subject: Re: JPanel refresh problem
Date: 2000/05/08
Message-ID: <39174465.3B555951@inprise.com>
X-Deja-AN: 620864085
Content-Transfer-Encoding: 7bit
References: <3916C2E3.4C184D1B@sensiva.com> <391738B5.5EBFDB4D@bilbo.bio.purdue.edu> <3916CC3E.5B66D947@sensiva.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing