This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Changing the content pane Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 8290

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


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Changing the content pane
 
Similar Threads
background color of a jframe
Making JInternalFrame Modal
How to Add Scroll bars to a frame
toolbars in JFrame
Help Menu