Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Bug in mouse (click/drag) events under Windows?

Reply
Thread Tools

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

 
 
Chris
Guest
Posts: n/a
 
      04-06-2004
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
----------------------


 
Reply With Quote
 
 
 
 
Alex Molochnikov
Guest
Posts: n/a
 
      04-06-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> ----------------------
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Capture With Mouse , Mouse Position Capture Max Java 7 08-08-2009 11:51 PM
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
Heres a mouse theres a mouse what a mouse do? unholy Gaming 37 09-17-2006 08:59 AM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
ASP.Net Datagrid get Cell Contents on mouse click or mouse down Davisro ASP .Net 2 04-23-2004 07:18 PM



Advertisments