Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. Timer timer = new Timer(1000, new TimerListener());
  2.  
  3. class TimerListener implements ActionListener{
  4. int elapsedSeconds = 30;
  5.  
  6. public void actionPerformed(ActionEvent evt){
  7. elapsedSeconds--;
  8. timerLabel.setText(elapsedSeconds)
  9. if(elapsedSeconds <= 0){
  10. timer.stop();
  11. wrong()
  12. // fill'er up here...
  13. }
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement