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

Swing: setMultiClickThreshhold issue, related to bug 4367718

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • client-libs



      Name: dk106046 Date: 07/12/2002

      java version "1.4.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
      Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

      and

      java version "1.4.1-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b15)
      Java HotSpot(TM) Client VM (build 1.4.1-rc-b15, mixed mode)
       


      ------------
      As in bug 4367718, API calls AbstractButton.setMultiClickThreshhold()
      and getMultiClickThreshhold() were added in 1.4 to solve problems
      with multiple dialogs when only one is desired. This works okay for
      mouse clicks, but exactly the same problem still exists for rapid
      presses of the activate key, such as the Spacebar.

      This can be fixed in BasicButtonListener by repeating the
      logic added to the mousePressed and mouseReleased methods
      in the PressedAction and ReleasedAction inner classes,
      respectively.

      Steps to reproduce:
      1. Change into the directory %JAVA_HOME%/demo/jfc/SwingSet2
      2. Launch the demo : java -jar SwingSet2.jar
      3. Wait for the demo to load.
      4. Select the 'JOptionPane demo' (eigth along from the left) (in fact, any of the buttons)
      5. Click the 'Show Warning Dialog' button to open the Dialog box, and then select the 'OK' button to close it.
      6. The current focus remains on the 'Show Warning Dialog' button, so I can press 'space' to simulate a click of the button, and display the Warning Diaglog box.
      7. Now, continue pressing 'space' to display/close the Warning Dialog Box. After about 5 iterations, an empty dialog box is displayed without an option to close the window. The 'X' in the top right hand corner of the Dialog box does not work.
      8. The demo is now unuseable and the java process has to be killed.

      This may only be reproducable on slower machines.

      ======================================================================

            duke J. Duke
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: