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

Discussion in 'Java' started by Chris, Apr 6, 2004.

  1. Chris

    Chris Guest

    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
    ----------------------
     
    Chris, Apr 6, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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, Apr 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davisro
    Replies:
    2
    Views:
    1,316
    Jim Corey
    Apr 23, 2004
  2. =?Utf-8?B?am9qb2Jhcg==?=
    Replies:
    1
    Views:
    4,090
    wwwtar
    Oct 2, 2006
  3. spohle
    Replies:
    0
    Views:
    375
    spohle
    May 22, 2006
  4. T
    Replies:
    0
    Views:
    380
  5. Daniish
    Replies:
    2
    Views:
    245
    Thomas 'PointedEars' Lahn
    Jun 13, 2008
Loading...

Share This Page