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 / August 2006

Tip: Looking for answers? Try searching our database.

Adding/Removing Panels

Thread view: 
christopher_board@yahoo.co.uk - 17 Aug 2006 20:00 GMT
I am trying to add and remove panel in Java. I have a main application
screen with a panel added to the contentPane. This works without any
problems. When I click a button in the added panel it should remove
this panel and add a different one. How do I do this. Any help would be
apreciated. Thank you
Ed - 18 Aug 2006 08:40 GMT
christopher_board@yahoo.co.uk skrev:

> I am trying to add and remove panel in Java. I have a main application
> screen with a panel added to the contentPane. This works without any
> problems. When I click a button in the added panel it should remove
> this panel and add a different one. How do I do this. Any help would be
> apreciated. Thank you

You've to remove the old panel, add the new one, and re-draw the
container.

See drawPanel() at:
http://www.edmundkirwan.com/servlet/fractal/cs1/code/package29.html#drawPanel

Which calls pokerFrame.setTablePanel() and pokerFrame.redraw().

Bit of a heavy-handed approach, I suppose ...

.ed

--
www.EdmundKirwan.com - Home of The Fractal Class Composition.

Download Fractality, free Java code analyzer:
www.EdmundKirwan.com/servlet/fractal/frac-page130.html


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.