/*<applet code="Ball.class" width=300 height=300></applet>*/

import java.applet.*;
import java.awt.*;

public class Ball extends Applet implements Runnable{
int x;
Thread th;
public void start(){
th= new Thread(this);
th.start();
}

public void run() {
for(x=0; x<180; x++) {
repaint();

try{

Thread.sleep(100);

}catch(InterruptedException e) { }

}
}

public void paint(Graphics g) {
g.drawOval(x,90,20,20);
g.drawLine(0,110,200,110);
}
}