Take a look at the CardLayout class.