// general form of an applet public class Fred extends Applet { public void init() { // create the GUI, get images, etc. add(new Label("Fred")); } // init } // Fred **************************************************************** **************************************************************** // general form of an application class Fred extends JFrame { public Fred() { // create the GUI, get images, etc. Container contentPane = getContentPane(); // remember to put your components in the contentPane contentPane.add(new JLabel("Fred")); } // constructor public static void main(String [] args) { Fred i = new Fred(); // choose more meaningful name i.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } // windowClosing }); i.pack(); i.setSize(600, 800); i.setVisible(true); } // main } // Fred