Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4199397

MouseEvent.getClickCount() should reset if mouse button changes

XMLWordPrintable

    • 1.2.2
    • generic
    • generic




      Name: krT82822 Date: 12/22/98


      Run the following example, and resize the frame so you can click on the client region. Left-click then quickly right-click (and vice versa).
      The clickCount returns ',1,2', but should return ',1,1'. The clickCount should reset when the mouse buttons change.

        snippet example:
        ----------------------------------8<
        import java.awt.*;
        import java.awt.event.*;
        public class MouseClicks {
          public static void main(String[] args) {
            Frame f = new Frame();
            f.addMouseListener(new MouseAdapter() {
              public void mousePressed(MouseEvent e) {
                System.out.print("," + e.getClickCount());
              }
            });
            f.show();
          }
        }
        >8----------------------------------
      (Review ID: 48255)
      ======================================================================

            xdengsunw Xianfa Deng (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: