I wouldn't. I would create my code in a way to create a JPanel, and then would add my JPanel to whatever I needed for it to display best.
I just made this cool applet, and I wanted to see if I could make it run both ways. How?
I tried to make the public static void main part with a JFrame, and add the applet, but it wont work! nothing shows!
What didn't you understand about Fubarable's response?
isnt he saying to re-code it in jpanel form?