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

[macosx] Test failure because Component.transferFocus() works differently in applet and application.

XMLWordPrintable

    • b18
    • x86
    • os_x
    • Verified

        Run the attached minimal example as an application and as an applet. It will rather slowly transfer focus to and fro using focusNext/PreviousComponent of KFM and transferFocus() of the Component. You will see that final focused component will be different for applet and application.

        I have some tests failing on Mac for exactly that reason: button.transferFocus() called from a last child component in a Frame (not that button), when running as an applet, would transfer not to a next component after button but to the button itself.

        Perhaps this behaviour is someway expected but it isn't clear from a specification. And then, the tests don't expect it, and they usually pass on the other platforms.

        Yet another detail: an example works not on EDT as in the real test, however the real test fails on EDT just the same.

              ant Anton Tarasov (Inactive)
              yan Yuri Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: