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.