After playing with CardLayout on several programs, I've become curious on how to PROPERLY use CardLayout

. I understand the show commands and what not, but I'm not sure what I should do with the items I want to show. Let me explain with my example. I wrote a program that has an opening menu in which you pick what you would like to do. When you select what you would like to do, the menu is replaced with a new screen that pertains to your selection from the opening menu. While I understand that this is the typical situation to use CardLayout, I'm not sure if I'm doing it right. The problem is, I create a separate class for each of the different screens that the user would be sent to, causing my project to have an abundance of class files. Am I supposed to create a separate class that extends JPanel for all of the various screens or is there a better way to do this? Thanks a lot!