This should be a simple task, but I don't do that much with Java.
5 different JPanel classes which handle their own actions have been created. For this conversation we will call them MyPanel1 ... MyPanel 5. The first of these is a button/keypad menu. All of this must run within a JApplet. When the user selects one of the buttons a new class instance is created of the appropriate class and becomes the content for the JApplet. When the user wishes to exit that JPanel they chose an exit option and it finalizes. The JApplet should redisplay the original menu JPanel class (MyPanel1 for this discussion).
Need to see a code snippet for the switching back and forth.