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

Checkbox gets stuck in intermediate state

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000, windows_xp

      Description

      Name: gm110360 Date: 07/26/2004


      FULL PRODUCT VERSION :
      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      Setting/resetting checkbox with mnemonic may left checkbox in intermediate state (not set or not reset) if Ctrl button was touched.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Get any form with JCheckbox. JCheckbox should has mnemonic.
      Press Alt-mnemonicChar and then (still holding Alt-mnemonicChar) press Ctrl button. Ctrl button should be pressed immediately after pressing Alt-mnemonicChar. Bug doesn't reproduce if press Ctrl-Alt-mnemonicChar or, if Ctrl pressed after a delay atfer pressing Alt-mnemonicChar.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Explicit state of checkbox should be painted when all buttons are released.
      ACTUAL -
      Checkbox's intermediate state is painted (like pressing and holding left mouse button on it)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JFrame;
      import javax.swing.JCheckBox;

      // Just to create the sample form.
      public class XXX {
        public static void main(String[] args) {
          JFrame frame = new JFrame();
          JCheckBox checkBox = new JCheckBox();
          checkBox.setText("Checkbox");
          checkBox.setMnemonic('C');
          frame.getContentPane().add(checkBox);
          frame.pack();
          frame.show();
        }
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 209044)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: