I have a program, which is of bouncing balls running through threads.
My goal is to be able to pause each thread by clicking on the ball as it moves on screen, and resume when clicked again.
I create new threads by using new Thread on same object each time, but i do pass them into an Array List.
How could i go about checking if the user click at coordinates X/Y landed on a SPECIFIC thread, and then be able to reference that thread?
Obviously i can't expect big answers here, but if you have expertise in such an area, could you give me a recommended tutorial which would cover what I'm after.
I'm familiar with the basics of a Mouse Listener, but not at detecting what thread was clicked on, or if mouse was clicked on any thread and so forth.
Thanks in advance.