Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timer timer = new Timer(1000, new TimerListener());
- class TimerListener implements ActionListener{
- int elapsedSeconds = 30;
- public void actionPerformed(ActionEvent evt){
- elapsedSeconds--;
- timerLabel.setText(elapsedSeconds)
- if(elapsedSeconds <= 0){
- timer.stop();
- wrong()
- // fill'er up here...
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement