🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16832

Re: adding components to a pane based on a user action

#16832
From: Lili Zhang
Date: Fri, 15 Jan 1999 00:00
19 lines
1358 bytes
Daniel R. J. Lind wrote:

> What I want to do is add field to a pane when a user clicks a button.  In my
> current arrangement I have two tabbed panes, (which is kinda incidental) but
> when you click the button to add the field, the field doesn't show up until
> you click the unrelated tab and then click the tab which the component is
> on - and hey presto - there it is.  I am assuming that this is due to a
> repaint.  If that is it, how do I force a repaint?  If all you have do is go
> 
> repaint();
> 
> afterwards then that's not it cos that don't work!
> 
> JDK 1.1.6_borland with Swing 1.1 in an applet.

Try "revalidate()" on the component you add or its container(s).


Paul Furbacher
Technical Details
Message-ID: <369FAEAB.BA20E45C@spcorp.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <77ltki$1hi22@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5e8e9b8e8eccf9c5
X-Google-Attributes: gidf74b3,public
From: Lili Zhang <lili.zhang@spcorp.com>
Subject: Re: adding components to a pane based on a user action
Date: 1999/01/15
Message-ID: <369FAEAB.BA20E45C@spcorp.com>
X-Deja-AN: 433100289
Content-Transfer-Encoding: 7bit
References: <77ltki$1hi22@forums.borland.com>
To: "Daniel R. J. Lind" <daniel@synopsys.co.nz>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: lili.zhang@spcorp.com
Newsgroups: borland.public.jbuilder.java.language