アットウィキロゴ

apple0723

import java.applet.Applet;
import java.awt.Graphics;

public class apple0723 extends Applet implements Runnable
{
   int num;

   public void init()
   {
      Thread th;
      th = new Thread(this);
      th.start();
   }
   public void run()
   {
      int i;
      try{
         for(i=0; i<50; i++){
            num = i;
            repaint();
            Thread.sleep(500);
         }
      }
      catch(InterruptedException e){}
   }
   public void paint(Graphics g)
   {
      g.drawString("asagaya", 500-5*num, 10*num);
   }
}
最終更新:2010年09月16日 13:29