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

JButton doesn't fire action event to the AWTEventListener

XMLWordPrintable

    • x86
    • windows_2000, windows_xp

      FULL PRODUCT VERSION :
      1.4.2_08

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      I'm trying to listen to all events in the gui, using
            Toolkit.getDefaultToolkit().addAWTEventListener(m_awtEventCollector , AWTEvent.ACTION_EVENT_MASK ).
      the eventDispatched is called when pressing a awt.Button, but not when pressing javax.swing.JButton. this will force me to add a specific actionListener to every JButton.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      add the listener:
        Toolkit.getDefaultToolkit().addAWTEventListener(m_awtEventCollector , AWTEvent.ACTION_EVENT_MASK );

      now press a JButton and a Button.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      eventDispatched should be called for the JButton.
      ACTUAL -
      eventDispatched was called only for the button

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      go over all JButtons and add an actionListener.
      This is bad because components won't be disposed as long as my listener reffers to them.
      ###@###.### 2005-06-29 09:40:01 GMT

            Unassigned Unassigned
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: