Re: Mouse Events not being registered
From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 02/23/04
- Next message: Silvio Bierman: "Re: Accessing Microsoft Outlook from a Java applet"
- Previous message: PlasmaDragon: "Inline bytecode?"
- In reply to: John Champaign: "Mouse Events not being registered"
- Next in thread: John Champaign: "Re: Mouse Events not being registered"
- Reply: John Champaign: "Re: Mouse Events not being registered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Feb 2004 15:55:39 -0800
John Champaign <jchampai@hopper.math.uwaterloo.ca> wrote in message news:<Pine.SOL.4.44.0402220216040.27414-100000@hopper.math.uwaterloo.ca>...
> Hi all,
>
> I'm working on an educational applet for a child with special needs.
>
> He's got a bit of a trick to make my life more difficult... To interact
> with the applet he needs to click on buttons, which is fine most of the
> time (he comes from a Mac environment, so I accept mouse clicks from the
> right or left button when he's working on the PC). But every once in a
> while, he'll press and hold the right mouse button, move onto a JButton,
> then left-click, which my applet doesn't seem to like (it doesn't
> register that the mouse has been clicked).
>
> My *GUESS* of what the problem is is that the mouse event begins when he
> is off the JButton, so its not registered with the JButton's mouse
> listener (although the Panel it begins on isn't a mouse listener).
> When he moves onto the JButton and clicks the new "Mouse Presed" event
> isn't passed to the JButton's listener. This doesn't make complete sense
> as the JButton DOES detect when the cursor moves on or off the JButton (so
> its still registering *some* new mouse events).
>
> The only way I currently see around this is to make the Panel the button
> was added to a mouse listener, then pass clicks to the appropriate buttons
> depending on the cursor's location. Does anyone have any ideas for a
> cleaner way to fix this? The user is non-verbal, so telling him not to do
> this isn't an option.
>
> My apologies for the lengthy explaination. I've searched for this, but
> couldn't find anyone experiencing something similar. If you have any
> suggestions for search terms that I might have missed (my apologies in
> advance), I'd love to hear them.
>
> Thanks,
>
> John
If it's me, I would try implement ALMOST every method defined in the
MouseInputListener and register it onto the JButton in question. Then
I would do some trial and error.
- Next message: Silvio Bierman: "Re: Accessing Microsoft Outlook from a Java applet"
- Previous message: PlasmaDragon: "Inline bytecode?"
- In reply to: John Champaign: "Mouse Events not being registered"
- Next in thread: John Champaign: "Re: Mouse Events not being registered"
- Reply: John Champaign: "Re: Mouse Events not being registered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]