import java.applet.Applet; import java.awt.*; import java.net.URL; public class raceField extends Applet implements Runnable{ private Car [] cars; private long lastUpdateTime; private boolean haveWinner; private Thread thread; public void init(){ Image img; try{ URL url = new URL (this.getCodeBase(),"car.gif"); img = this.getImage(url); } catch (Exception e){ img = null; } } public void paint (Graphics g){ } public void Start(){ thread = new Thread(this); haveWinner = false; thread.start(); } public void Run(){ while(!haveWinner){ this.repaint(); try{ Thread.sleep(100); } catch (InterruptedException e){} } } }