I have had a long running issue with Firefox and applets where an applet loses focus (usually switching tabs) and will not regain it when switching back or with a mouse click. I generally give up trying to sort this out and just end up putting this in the rendering loop:
1 2 3
| if (!hasFocus()) { requestFocus(); } |
Obviously this is sub-optimal and I would like to get this sorted once and for all. Does anybody have a reliable way of managing applet focus. Also can someone tell me why a focusable object refuses to gain focus on a mouse click?
The applet I am working on below works about half the time initially and pretty much always stops responding to key inputs when switching tabs.

Let me know if it works for you and which browser you are using (left/right keys for strum).