import java.applet.*;
import java.awt.*;
public class rectangle extends Applet
{
void slp(int x)
{
try
{
Thread.sleep(x);
}
catch(Exception e)
{}
}
public void init()
{}
public void paint(Graphics g)
{
for(int i=0;i<10;i++)
{
rectangle rect=new rectangle();
g.drawRect(20+i,40+i,40,50);
slp(10);
rect.repaint();
}
}
}
问问题
36 次