One option is to use CardLayout.