500 points -- NetBeans Timer start issue

I have a problem with the NetBeans timer bean.  
For example timer1 is started when a user clicks a button on the screen - the  button's event handler calls timer1.start().  That works fine.
After the timer1 runs for 10 seconds, code inside the timer's event handler issues a timer1.stop();

Then the user will click on the button which issues the time1.start() again - but timer1 does not start.  There is no error - but timer1 never starts running again and never fires off its event handler.

I have tried timer1.restart();  -- netBeans said it is not a valid method.

Please help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

can u post your code
try to construct a new Timer object each time button pressed
shannonriceAuthor Commented:
I figured out a way around this problem.

Inside the timer1's event handler - Instead of issuing a timer1.stop() when I want to disable the timer, I do timer1.setOnceOnly(true)

since the code is in the even handler, it considers it the one time it should run, and the timer pauses.

later when the button calls timer1.start()  it works!!

I doesn't make any sense to me why timer1.stop() makes it so I can no longer restart it.  It must be that issuing the timer1.stop() within the timer1's event handler stops the thread that listens to a start() command.  So that it is no longer possible to restart it.
Question PAQ'd
500 points refunded.

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.