Loading gui from different class

This is kinda of a newbie question. Let's say I have a jApplet in jappletform.java and a jPanel in jpanelform.java. Different classes in the same package. What is the code to be able to hit a button in the applet and display the jpanel inside the japplet? Thanks in advance.
[282 byte] By [mtbonea] at [2007-11-26 16:22:58]
# 1

MyPanel childPanel = new MyPanel();

mainPanel.add( childPanel );

mainPanel.revalidate();

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the code retains its original formatting.

camickra at 2007-7-8 22:46:48 > top of Java-index,Desktop,Core GUI APIs...