Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changing the content pane" Watch "Changing the content pane" New topic
Author

Changing the content pane

Ryan Maxwell
Greenhorn

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
Bartender

Joined: Oct 29, 2001
Posts: 9102
    
    9

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: http://aspose.com/file-tools
 
subject: Changing the content pane