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

Checkbox Item Events are Double for Pen Input on Tablet PCs

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      Documented in Java SE 1.5.0.09 and Java SE build 1.7.0-ea-b02

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Verified on two Tablet PC (Motion Computing LS800 and Motion Computing M1300) running Windows XP Tablet PC Edition 2005.

      A DESCRIPTION OF THE PROBLEM :
      On a Tablet PC, using pen input to click a Checkbox gives two Item Events.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Use a real Tablet PC running Windows XP Tablet PC Edition 2005.
      2. Run the applet on www.segal.org/java/just_checkbox/ (code given below) using Firefox or Internet Explorer running the Sun JVM.
      3. Open the Sun Java Console.
      3. Click the checkbox using the tablet's pen.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Single clicks should produce only one item event.
      ACTUAL -
      Single clicks typically result in two item events (for some clicks just one).

      Details of additional testing:

      1. The problem does not occur in the Microsoft JVM.
      2. The problem does not occur when using a mouse on a Tablet PC.
      3. This problem is particularly troublesome because programmers on non-pen-based computers will not know it is an issue, and a second click on a Checkbox often reverses the effect of the first click.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.applet.*;
      import java.awt.*;
      import java.awt.event.*;

      public class just_checkbox extends Applet implements ItemListener {

      Checkbox checkbox;
      int counter;

      public void init()
      {
          checkbox = new Checkbox("Checkbox");
          checkbox.addItemListener(this);
          add(checkbox);
      }

      public void itemStateChanged(ItemEvent ie)
      {
          if (ie.getSource() == checkbox) System.out.println("Item event " + ++counter);
      }
      } // END OF Class just_checkbox
      ---------- END SOURCE ----------

      Attachments

        Activity

          People

            art Artem Ananiev (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: