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

getClickCount() does not detect double click

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description



      Name: diC59631 Date: 01/23/98


      When you double-click on the TextArea displayed
      by the following program, the reported click count
      is 3 instead of 2.
      JDK 1.1.4 correctly reported 2.

      import java.awt.*;
      import java.awt.event.*;

      public class Click
      {
        public static void main(String[] args)
        {
          Frame f = new Frame();
          f.setLayout(new BorderLayout());

          TextArea t = new TextArea();
          t.addMouseListener(new MouseListener());
          f.add("Center",t);

          f.pack();
          f.show();
        }

        static class MouseListener extends MouseAdapter
        {
          public void mouseClicked(MouseEvent e)
          {
            System.out.println("click "+e.getClickCount());
          }
        }
      }
      (Review ID: 23887)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: