class java.lang.Thread
implements Runnable
//....
try {
Thread.sleep( 2000 );
} catch ( InterruptedException e ) { }
//....
g.drawline(x1,y1,x2,y2)
repaint();
import java.applet.Applet;
import java.awt.Graphics;
public class XmasApplet extends Applet
{
public void paint( Graphics g )
{
g.drawLine(10,20,30,40);
try {
Thread.sleep( 1000 );
}
catch ( InterruptedException e ) { }
g.drawLine(20,30,40,50);
repaint();
}
}