/*<applet code="Image001.class"width=200 height=200>
</applet>
*/
import java.util.*;
import javax.swing.*;
import java.awt.*;
public class Image001 extends JApplet implements Runnable{
ImageIcon pic1;
double j=2;
int i=1;
int k=200;
public void init(){
pic1=new ImageIcon("D:/myjava/tupian/avril.gif");
resize(400,400);
}
public void run(){
System.out.println("ceshiceshi");
}
public void paint (Graphics g){
pic1.paintIcon(this,g,i,50);
while(j>1) {
j++;i++;
pic1.paintIcon(this,g,i,50);
if(j%5==0)
{
if(i>200) {pic1.paintIcon(this,g,k,50) ;k--;if(k<=0) {i=1;k=200;}}
try
{Thread.sleep(50);}
catch(Exception e) {}}
if(j>10000) j=1;}
}
}
这个程序总是拖着长长的影子 请各位高手帮我看看