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

1.5.0 Regression: Showing JPopupMenu prevents double clicking on JButton


    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.4.1, 1.4.2, 5.0
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
    • CPU:
    • OS:
      linux, solaris_9, windows_98, windows_nt, windows_2000, windows_xp


      What follows is a description of what I beleive the problem to be. See note at the bottom on how this is creating problems with internal frames in the Motif look and feel.

      A JButton is set up to show a JPopupMenu when it is clicked (on ActionPerformed). The button also has a MouseListener that listens for mousePressed events. It checks these mouse events for the click count and takes action when the click count is 2 (In the example, no action is taken, the demo simply prints out the click count). In 1.5.0, it seems that showing the popup menu prevents the click count from getting to 2.

      To reproduce, compile and run the attached demo.
      Double click on the button.

      In 1.4.2, one can easily double click on the button and get a click count of 2 printed to the console.

      In 1.5.0, one can no longer double click to get a click count of 2.

      This is on Windows NT 4, SP 6.


      Note, the attached demo is a simple test case showing the problem. It was first discovered with internal frames in the Motif look and feel. In 1.5.0, double clicking on the system button (upper left) fails to close an internal frame. When an internal frame is iconified, double clicking on that icon also fails to restore the internal frame. This can be seen in the SwingSet2 demo.


          Issue Links



              • Assignee:
                kizune Alexander Zuev
                shickeysunw Shannon Hickey (Inactive)
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: