import java.applet.Applet;
import java.awt.Graphics;
public class ap06 extends Applet implements Runnable
{
int num;
Thread th;
public void init()
{
num=num+1;
th = new Thread(this);
th.start();
}
public void run()
{
int n;
try{
for (n=1;n<100;n++){
repaint();
num=num+1;
Thread.sleep(500);
}
}
catch(InterruptedException e){}
}
public void paint(Graphics g)
{
g.drawString("asa", 100-num, num);
}
}
最終更新:2010年09月16日 16:43