Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / April 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Chris - 06 Apr 2004 02:16 GMT
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 - 06 Apr 2004 08:04 GMT
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

> 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
[quoted text clipped - 30 lines]
> mouseClicked X:86 Y:84
> ----------------------


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.