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

When a Component does not have focus, key binding for accelerators does not work

XMLWordPrintable

    • beta2
    • generic, sparc
    • generic, solaris_8

      This problem entails multiple parts:
      *In summary, the accelerators and mnemonics stop working when the mouse pointer
       is on top of a heavyweight component.
      *First was filed to java/classes_swing (4395074). Here is the description:
      -----
      In a JDialog (or JFrame) with a menubar, mnemonics and accelerators stop
      working when you add a heavyweight component to the content pane.

      I am aware that mixing heavyweight and lightweight components is not
      particularly recommended, but there are situations where this is unavoidable,
      such as in our case where we get a Component from JMF.
      -----
      *This problem was deemed a duplicate of 4344900 and closed as fixed in 1.4.
      *Finally, the fix does not quite work and the resulting bug is this one.
       If you use a heavyweight component in a dialog also containing swing component,
       you observe the following behavior:
      If the heavyweight component has focus, the accelerator and mnemonics
      work (in 1.4, using the bug fix for 4344900).
      If a swing component has focus, the accelerator an mnemonics work unless
      the mouse pointer is on top of the heavyweight component.
      *Attached is a Test program showing that behavior.

            son Oleg Sukhodolsky (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: