是不是这种效果
public class Test  extends Applet implements Runnable {
int count = 0;
public void init() {
Button button = new Button("test");
button.addActionListener(new But_ActionListener());
add(button);
} public void start() {
Thread test = new Thread(this, "test");
test.start();
} class But_ActionListener implements ActionListener {
public void actionPerformed(ActionEvent e1) {
count = 0;
// ???????????????
}
} public void run() {
// TODO Auto-generated method stub while (true) {
try {
Thread.sleep(10000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(count + "   -  " + (new Date()));
count++;
}
}}