| Author |
Pausing the Mouse Listener
|
James Filson
Greenhorn
Joined: Nov 24, 2009
Posts: 11
|
|
Hi,
I want to disallow the user's click from being registered until my animation on a JPanel has completed. I've tried setting a boolean to true once the animation is completed, and checking the boolean before registering the mouse click. However, it seems that Swing just 'queues' the mouse click until the animation has finished processing so this doesn't work, as by that time the boolean has already been set.
Does anybody have any tips on how I can do this? Thanks in advance
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
James Filson wrote:I've tried setting a boolean to true once the animation is completed, and checking the boolean before registering the mouse click.
Perhaps you aren't actually doing that.
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1808
|
|
However, it seems that Swing just 'queues' the mouse click until the animation has finished processing
No, because as you where told in your last posting, animation should NOT be done on the EDT.
Does anybody have any tips on how I can do this?
As Paul said above you are probably not doing what you think you are doing. We are NOT mind readers and since you haven't posted a SSCCE like you've been asked to do in the past you are on your own. I'm not going to sit here wasting time asking for a SSCCE every time you post a question.
|
 |
 |
|
|
subject: Pausing the Mouse Listener
|
|
|