To make a class that can run as both an applet and an application, write your applet and then put in a main() method that looks like this: import java.awt.*; import java.awt.event.*; import java.applet.*; public class Fred extends Applet { public static void main(String [] args) { Frame i = new Frame(); // choose more meaningful names Fred j = new Fred(); j.init(); // this code makes it so your application will close the window i.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } // windowClosing }); i.add(j); i.pack(); i.setSize(500, 600); // make it whatever size you made your applet i.setVisible(true); } // main } // Fred