Focus Problem that Began with Java 1.7 build 17

(Sun bug ID # 6607170)


Steps to reproduce:  Click the "Change panel" button in the frame that pops-up from the applet on this page.  This switches in a new panel with a TextField for which requestFocus is called.

Intended behavior: After clicking the "Change panel" button, in 1.7 build 16 the requestFocus call results in the cursor appearing in the TextField. 

Actual behavior: After clicking the "Change panel" button, in 1.7 builds 17 and 20 the requestFocus call doesn't work (builds 18 and 19 not tested).  It seems as if the cursor appears briefly and then disappears.  However, minimizing the Frame and restoring it results in the cursor appearing.

Fixed in Java 1.7-ea-b27

Source code