import java.applet.*;
import java.awt.*;
public class car extends Applet
{
Image pic;
public void init()
{
pic=getImage(getDocumentBase(),"cl.jpg");
}
public void paint(Graphics g)
{
for(int i=0;i<1000;i++)
{
g.drawImage(pic,i,10,this);
try
{
Thread.sleep(10);
}
catch(Exception e)
{
}
}
}
}
/*
<applet code=car.class height=800 width=1200>
</applet>
*/
import java.awt.*;
public class car extends Applet
{
Image pic;
public void init()
{
pic=getImage(getDocumentBase(),"cl.jpg");
}
public void paint(Graphics g)
{
for(int i=0;i<1000;i++)
{
g.drawImage(pic,i,10,this);
try
{
Thread.sleep(10);
}
catch(Exception e)
{
}
}
}
}
/*
<applet code=car.class height=800 width=1200>
</applet>
*/
No comments:
Post a Comment