There are several examples of using an ActionListener on a JButton as well as on a Timer in the link I gave you.
Split your problem up into smaller pieces: Can you create a standalone program that...
Type: Posts; User: KevinWorkman
There are several examples of using an ActionListener on a JButton as well as on a Timer in the link I gave you.
Split your problem up into smaller pieces: Can you create a standalone program that...
In that case, you'll need *two* ActionListeners: one for the JButton, and one for the Timer. The JButton's ActionListener starts the Timer. The Timer's ActionListener updates the display.
You...
You'll need at least 2 separate listeners: a MouseListener that triggers the event (starting the timer), and an ActionListener that gets triggered by the Timer when it fires.
I would suggest...
What have you tried? How are you updating the score indicator?
You might want to take a look at Swing Timers. More info here: Swing Timers - Tutorials - Static Void Games