I have invoked cancel()
method of Timer class outside the run()
method of TimerTask
class.
I want to know is it possible to restart this timer?
On stop button I have invoked cancel() method :-
private void stopBtnActionPerformed(java.awt.event.ActionEvent evt) {
t.cancel();}
Here t is instance of Timer class.