> > Try the attached patch. (Disclaimer: I haven't particularly tried it; > just quickly threw it together.)
Well, it improved lots of things. It works perfectly with gtk, qt, tk, keyboard, mouse, … The example code now works when I use Java 1.6.0_12-b04. But if I compile and run it with the unreleased 1.7.0-ea-b43, the focus is still buggy: not only the text field misses focus after going to that window, but also I can't restore the focus to the text field even if I click into it many times. Even with JDK 1.7, this doesn't happen in other window managers (I tried wmaker).