public class test extends Applet implements Runnable,ActionListener{ Thread MyThread; int count; Graphics offGraphics; Label lb;
public void init(){ String c = new String(); count = 0; Panel p = new Panel(); Button b = new Button("OK"); b.addActionListener(this); p.add(b); setLayout(new BorderLayout()); add("South",p); lb = new Label("0"); lb.setAlignment(Label.RIGHT); add("North",lb); }
public void paint(Graphics g){ String c = new String(); lb.setText(c.valueOf(count)); }