Hey all,
This should be simple, but I'm baffled.  I have a component that responds to
a double click.  I detected the double-click with a mouse adapter:
            public void mouseClicked(MouseEvent e) {
                if ( e.getClickCount() == 2 ) {

The problem is that the duration over which the mouse clicks are held seems
long to me.  If a user double-clicks twice in succesion, the 2nd one is
ignored because the clickCount is now 3 or 4.  On the other hand, if they
wait one second and then click once, it responses because the clickcount
fell to one, then rose back to 2.

The easy solution would be to reset the clickCount to 0 after a double-click
is registered.  However, I can see no way to do this.  Does anyone have a
solution to this (certainly common) problem?

Thanks,
James Brundege


_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to