Mega Code Archive

 
Categories / Java Tutorial / Development
 

An Swing-based applet skeleton

import javax.swing.*;    /*  This HTML can be used to launch the applet:    <applet code="AppletSkel" width=300 height=100>  </applet>    */    public class AppletSkel extends JApplet {    public void init() {      // Initialize the applet and construct the GUI.    }      // Called second, after init().  Also called whenever the applet is restarted.     public void start() {      // Start or resume execution.    }      // Called when the applet is stopped.    public void stop() {      // Suspend execution.    }      // Called when applet is terminated.  This is    // the last method executed.    public void destroy() {      // Perform shutdown activities.    }  }