import java.awt.*; import java.applet.*; public class BarMeterApplet1 extends Applet implements Runnable { BarMeter1 meter; public void init(){ meter = new BarMeter1(); add(meter); } public void start(){ Thread thread = new Thread(this); thread.start(); } public void run(){ while(true){ for(int i = 0 ; i < 100 ; i++){ meter.setValue((double)i); try{ Thread.sleep(100); }catch(InterruptedException ex){ return; } } } } public void update(Graphics g){ paint(g); } }