Article View: borland.public.jbuilder.java.api
Article #3319Re: changing the contents of a Panel at runtime
From: Rich Wilkman
Date: Thu, 19 Feb 1998 00:00
Date: Thu, 19 Feb 1998 00:00
61 lines
2456 bytes
2456 bytes
Michael:
When you change the contents of a container you need to call
validate() for those changes to show up.
-Rich
Michael Hunter wrote:
>
> I would like to change the contents of a Panel at runtime, so that a
> different form displays depending on which menu item the user picks: if
> they pick "Xyz", the corresponding panel appears. If they then pick "Abc",
> Xyz disappears and Abc replaces it.
>
> I tried the following code:
>
> void menuEntryRetax_actionPerformed(ActionEvent e) {
> this.setTitle("Real Estate Taxes - " + PLAN_YEAR);
> EntryRetax theWin = new EntryRetax();
> panelData.add(theWin, BorderLayout.NORTH);
> }
>
> but the new panel didn't show up. What am I doing wrong?
>
> Michael Hunter
> Humbug_Reality@csi.com
>
> "But what can we do? We can't do anything to show what we could do if only
> we had the power we haven't got."
> -- Ladies Clarice and Cora of Gormenghast
>
> '************************************************************
> Visit the ActiveCAD Pages at
> http://ourworld.compuserve.com/homepages/Humbug_Reality/ActiveCAD/index.htm!
> '************************************************************
>
> Michael Hunter <Humbug_Reality@csi.com>
>
> Michael Hunter
> <Humbug_Reality@csi.com>
> Additional Information:
> Version 2.1
> Last Name Hunter
> First NameMichael
> Revision 19980219T030510Z
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team
If you see something that looks like an opinion up there,
it's mine and mine alone.
Mail sent to me from the newsgroups won't bounce but will
be ignored. If I have time, I'll respond, but you have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<34EC63E4.5CB6772F@corp.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6cg7i6$2936@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,daaffe7081602d1d X-Google-Attributes: gid1089d0,public From: Rich Wilkman <rwilkman@corp.borland.com> Subject: Re: changing the contents of a Panel at runtime Date: 1998/02/19 Message-ID: <34EC63E4.5CB6772F@corp.borland.com> X-Deja-AN: 326642982 Content-Transfer-Encoding: 7bit References: <6cg7i6$2936@forums.borland.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: None Newsgroups: borland.public.jbuilder.java.api