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

AWT JTextFiled does not get focus on a window creation when outer frame is SWTTh

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      windows

      Description

      This can be a AWT or SWT problem. Evaluation is needed.

      A simple SWT-AWT testcase DialogTest.java demonstrates the following issue:
      A Frame is created as SWT_AWT.new_Frame(new Composite(shell, SWT.EMBEDDED))
      Than JDialog with JTextFields are added to a Frame.
      When Frame is displayed and gets a focus - the inner JTextField does not get a focus!
      When user switches to another app and then back to this testcase the inner JTextField does get a focus as expected.

      A similar testcase written entirely on AWT works as exoected. See DialogTestPureAWT.java. Both testcases are attached.

      This can be reproduced JDK6u23 and JDK7b131.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ikrylov Ivan Krylov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: