Without spending too much time looking at your code, what you describe sounds like a job for CardLayout. I'll spend more time looking at your code and let you know if I have other ideas.