/* related posts with thumb nails */

An applet illustrating sequence of events in an applet.:

import java.applet.*;

import java.awt.*;

/**/

public class A1 extends Applet

{

String s="";

public void init()

{

s+=" Init,";

}

public void start()

{

s+=" Start,";

}

public void paint(Graphics g)

{

s+=" Paint";

g.drawString(s,10,100);

}

public void stop()

{

System.out.println("Stop");

}

public void destroy()

{

System.out.println("Destroy");

}

}

It prints “Init Start Paint in the applet and then

Stop

Destroy

On the console screen

Related Topics:

1 comments:

Unknown said...
This comment has been removed by the author.

Post a Comment