if (Applet.class.isAssignableFrom(appletClass))
{
Applet app = (Applet) appletClass.newInstance();
Window win = new Frame();
win.add(app);
app.setStub(new EmptyAppletStub());
app.init();
win.pack();
win.show();
return win; //successful, so return
} else