//注意到这个程序和Hello程序有什么不一样吗?在这个程序中多了implements Runnable。 public class carton extends Applet implements Runnable { Image img; Thread thd = null; int i; int imgWidth = 150; int imgHeight = 150; int ncyc=1 ;
String namestr[] = new String[5] ;
//当线程被激活时开始运行run()函数。 public void run() { for (int j=0; j<5; j++) { namestr[j] = Integer.toString(j,8)+".jpg" ; }