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

KeyPostProcessor is not getting called when the frame is non-focusable

XMLWordPrintable

    • generic
    • generic

      I am having a non-focusable frame with a button and a textarea. I have added a KeyPostProcessor that would re-dispatch the keyevent to the textarea and return 'true'. When clicking the button, I am creating a keyevent with button as the source and posting it to the event queue. I expect this to be dispatched to the post-processor since none of the components are having focus (This is specifically documented in the API doc for PostProcessor that keyevents that are about to be discarded because of no focus owner will be given to postprocessors). But postprocessor is never getting called when the frame is not focusable.

      This is reproducible on all releases since 1.4 on all platforms.

      I have attached a sample test. Execute the test. Click the button. If you don't see a message 'PostProcessKeyEvent called' on the console, the bug is reproduced.

            Unassigned Unassigned
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: