Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Bug in mouse (click/drag) events under Windows? (http://www.velocityreviews.com/forums/t132282-bug-in-mouse-click-drag-events-under-windows.html)

Chris 04-06-2004 01:16 AM

Bug in mouse (click/drag) events under Windows?
 
I have a working code that captures mouse events in a JPanel. I need
clicked, released, and dragged events. The code works like a charm on
Linux. Occasionally in Windows I'm getting both dragged and clicked
events for a single mouse action. When I press and release the mouse
button I should get either a click event or a drag event, not both.
Below is some output to prove what I'm sometimes getting on Windows.
Look how far the mouse is moved but I'm still getting a click event. I'm
using 1.4.2 on Linux and Windows. Any ideas about this bug?

Thanks,
Chris

mousePressed
mouseDragged X:316 Y:51
mouseReleased
mouseClicked X:316 Y:51
-----------------------
mousePressed
mouseDragged X:116 Y:73
mouseDragged X:116 Y:74
mouseDragged X:117 Y:74
mouseReleased
mouseClicked X:117 Y:74
-----------------------
mousePressed
mouseDragged X:83 Y:82
mouseDragged X:83 Y:83
mouseDragged X:84 Y:83
mouseDragged X:85 Y:83
mouseDragged X:86 Y:83
mouseDragged X:86 Y:84
mouseReleased
mouseClicked X:86 Y:84
----------------------



Alex Molochnikov 04-06-2004 07:04 AM

Re: Bug in mouse (click/drag) events under Windows?
 
Back in June 2003 I reported a somewhat similar problem with 1.4.2 Win.
(4874092 in Bugs Database). In my case, too, the code worked fine in 1.4.1
Win, and 1.4.2 Linux - but not in 1.4.2 Win. Sun's verdict was: there is a
bug, it will be (is?) fixed in 1.5 - but 1.4.2 will not be fixed.

SOL

"Chris" <unknown@devnull.org> wrote in message
news:40720526.5090504@devnull.org...
> I have a working code that captures mouse events in a JPanel. I need
> clicked, released, and dragged events. The code works like a charm on
> Linux. Occasionally in Windows I'm getting both dragged and clicked
> events for a single mouse action. When I press and release the mouse
> button I should get either a click event or a drag event, not both.
> Below is some output to prove what I'm sometimes getting on Windows.
> Look how far the mouse is moved but I'm still getting a click event. I'm
> using 1.4.2 on Linux and Windows. Any ideas about this bug?
>
> Thanks,
> Chris
>
> mousePressed
> mouseDragged X:316 Y:51
> mouseReleased
> mouseClicked X:316 Y:51
> -----------------------
> mousePressed
> mouseDragged X:116 Y:73
> mouseDragged X:116 Y:74
> mouseDragged X:117 Y:74
> mouseReleased
> mouseClicked X:117 Y:74
> -----------------------
> mousePressed
> mouseDragged X:83 Y:82
> mouseDragged X:83 Y:83
> mouseDragged X:84 Y:83
> mouseDragged X:85 Y:83
> mouseDragged X:86 Y:83
> mouseDragged X:86 Y:84
> mouseReleased
> mouseClicked X:86 Y:84
> ----------------------
>
>





All times are GMT. The time now is 10:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.