Will
Posts: 20
Nickname: lofty
Registered: Mar, 2005
|
|
Re: Replace Panel
|
Posted: Aug 31, 2005 1:56 AM
|
|
Thanks for the help Spike - I'd forgotten about CardLayout.
One question though - my current setup is a gridbaglayout with top, center and bottom panels (although the bottom panel is really obsolete). The top panel contains a JToolbar, so I'm not sure if this would work with a cardlayout unless I added the toolbar to each card (which I don't really want to do)?
One of the problems I seem to have when I try to replace the center panel is that the existing panel is not removing properly - even with repaint() and validate() methods, the new panel is superimposed over the old one, so my remove(centerPanel) method doesn't seem to be working.
Thanks again :)
|
|