Debugging Applets

From JavaProgramming

Show a Java console with Internet Explorer

output

The Applet below should give the following output in the Java console:

  init()
  start()
  paint()

a test Applet

  /* LifeCycle.java */
  import java.applet.Applet;
  import java.awt.*;
  Vector

public class LifeCycle extends Applet { // Override methods for all of the standard methods // called by the VM during the applet lifecycle. public void init() { System.out.println("init()"); } public void start() { System.out.println("start()"); } public void paint(Graphics g) { g.drawString("Lifecycle", 10, 20); System.out.println("paint()"); } public void stop() { System.out.println("stop()"); } public void destroy() { System.out.println("destroy()"); } }


CategoryDebugging


EditText of this page (last edited March 18, 2004) or FindPage with title or text search