Bug in mouse (click/drag) events under Windows?

C

Chris

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
----------------------
 
A

Alex Molochnikov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top