J
John
Jacob said:I can detect a docuble click using the MouseListener
interface and inspect the event.getClickCount().
However, at that point in time, the event has already
been classified as a single click (as the clickCount
is 1 the first time around).
My intention is to start action A on a single click
and action B on a double click. With a standard setup
I will get action A on a single click but action A + B
on a double click!
Seems like a delay is necessary in order to fully
classify the event. Is there a standard way to acheive
this?
Thanks.
Let's say the double click listener calls the method
handleDoubleClick(). In the single click listener, check the number of
clicks, and if it is 2, call handleDoubleClick().
Do NOT start buggering about with delays and things or your UI code will
degenerate into rubbish.
John