public class MyApplet extends JApplet
{
public void init()
{
...
}
public static void main( String[] args )
{
// construct and initialize applet
final MyApplet applet = new MyApplet();
applet.init();
// create frame to contain applet
JFrame containerFrame = new JFrame( "MyApplet Frame" );
containerFrame.getContentPane().add( applet );
containerFrame.pack();
containerFrame.show();
}
} // end class MyApplet