import java.applet.*; import java.awt.*; public class bspapplet extends Applet { Controls cntl; public void init() { setLayout(new BorderLayout()); DrawingArea d = new DrawingArea(400,340); add(d, "Center"); cntl = new Controls(d); add(cntl, "North"); validate(); setVisible(true); Image img = createImage(d.getPreferredSize().width, d.getPreferredSize().height); Graphics gc = img.getGraphics(); d.setImageAndGC(img, gc); } public void destroy() { System.out.println("destroy"); super.destroy(); } public void start() { System.out.println("start"); super.start(); if(cntl != null) cntl.resetEverything(); } public void stop() { System.out.println("stop"); super.stop(); if(cntl != null) cntl.resetEverything(); } }