I am running my animation by using the wakeupOnTimeElapsed behavior. I want to control the animation with a button so that when I press start it starts and when it finishes, if I want to start again I press button again it satrts again. How could this be done? Is it possible to use a JButton from swing and in the event actions try to call the processStimulus method or is there any special way of doing such a thing. Thanks.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org