Most ui frameworks sidestep this issue by sending click/double-click pairs, then
saying that interfaces should be designed so that any actions you perform should
work with that in mind. For example, in Windows a single-click selects an icon, and a
double-click opens the icon (ok, object). So the single-click is used as a sort
of precursor to the double-click. I think this is a pretty common system, because of
the issues you mention.
My advice is just to work within this model. There are very few cases where you can't
find some way to make a single-click meaningful without a double-click. Make
them work together.
Scott
8/1/2001 11:58:02 AM, "Kasparian, Raffi J." <[EMAIL PROTECTED]> wrote:
>Yes, I have been annoyed with this too. I haven't tried to figure out a
>workaround. I don't know why Java handles things this way -- maybe so that
>you will receive a click event every time the mouse is pressed (in case your
>program doesn't use double-clicks). The idea of delaying the processing of
>the first click so that you can find out later whether it was the first half
>of a double-click is particularly distasteful to me. But it's probably the
>only way to go.
>
>Raffi
>
>-----Original Message-----
>From: Ashish Aggarwal [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 31, 2001 3:31 PM
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] plz Explain!
>
>
>Hello!
>
>How to differentiate between single click of the mouse
>and double click.i am using:
>
>event.getClickCount() to find out the number of
>clicks.
>The problem is that, when I double click the mouse, it
>executes the code for:
>
>event.getClickCount()=1, before executing code for:
>
>event.getClickCount()=2
>
>I don't want event.getClickCount()=1 to take place
>when i am double clicking the mouse. Please reply as I
>am stuck for last three days. Hope to get a reply
>soon.
>
>Thanks All
>
>Ashish
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".