File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Changing the content pane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changing the content pane" Watch "Changing the content pane" New topic

Changing the content pane

Ryan Maxwell

Joined: Mar 21, 2006
Posts: 7
I'm trying to clear the content pane and then add all new componetns to it... Using the contentPane.removeAll() method, I've cleared the screen, but nothing, not even repainting, makes the new components visible... If anyone could help, I'd really appreciate it...
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Use a CardLayout. Way easier than trying to manage the invalidation/validation of components.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Changing the content pane
It's not a secret anymore!