Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

dynamic GUI

Thread view: 
technoscience@gmail.com - 14 Jan 2006 05:45 GMT
 Let's say, hypothetically, that I have a very simple GUI. Suppose I
have a JPanel taking up most of a JFrame, and that based on some
unrelated factors(some numerical instance), I want this JPanel to go
away, and have a different(already instantiated) JPanel take its place.
This seems like it should be really easy, can anyone explain how to
accomplish this?

thank you.

TS
Roedy Green - 14 Jan 2006 05:59 GMT
>I want this JPanel to go
>away, and have a different(already instantiated) JPanel take its place.

You can have both added, and alternately setVisible either one, the
revalidate.

You can add/remove them.

You can use a CardLayout
See http://mindprod.com/jgloss/layout.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Smith - 14 Jan 2006 06:06 GMT
>   Let's say, hypothetically, that I have a very simple GUI. Suppose I
> have a JPanel taking up most of a JFrame, and that based on some
> unrelated factors(some numerical instance), I want this JPanel to go
> away, and have a different(already instantiated) JPanel take its place.
> This seems like it should be really easy, can anyone explain how to
> accomplish this?

See java.awt.CardLayout

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

technoscience@gmail.com - 14 Jan 2006 07:21 GMT
Thank you Mr.Green and Mr.Smith, I really appreciate your help.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.