这是代码
public class TimeClass implements ActionListener{
int timerCounter;
public TimeClass(int timerCounter){
this.timerCounter = timerCounter;
}
public void ActionPerformed(ActionEvent time){
timerCounter--;
if(timerCounter >= 1){
timeLeft.setText("Time Remaining: " + timerCounter);
}else{
timer.stop();
timeLeft.setText("Game Over!");
click.setEnabled(false);
}
}
public void actionPerformed(ActionEvent e) {
}
}
计时器不会递减。代码有什么问题?我的演示文稿需要这个。尽快需要这个。谢谢。