Automatic Applet focus?

Does anyone know how I could make my applet gain focus automatically when it has loaded.

The current version of my project requires the user to click on the applet once, before the keys that control the game gets through…

I really hope that this is a problem that can be solved…

I’ve tried the requestFocus() method and the javascript approach but they don’t do the trick!

/Markus

I don’t have an answer for this, but if anyone does, I’d like to know as well!

Afaik there is no way to do that. The focus managing is one level higher than the sandbox. Just imagine a Applet would prevent you from entering an url in the address bar of your browser :wink:

However you can just include that first click into your logic flow. “Click to start” - no questions asked :slight_smile:

Yepp…

You’re probably right - Click to start is the only “neat” solution to the prob.

But it would be fun to be able to do it, but I recall reading something similiar to what you describe, oNyx.

Thanx / Markus