Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Automatic Applet focus?  (Read 1944 times)
0 Members and 2 Guests are viewing this topic.
Offline Murdockian

JGO n00b
*

Posts: 46


Java games rock!


« on: 2003-10-16 04:58:38 »

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
Offline nelsoc

JGO n00b
*

Posts: 3


Java games rock!


« Reply #1 on: 2003-10-17 23:34:17 »

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

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #2 on: 2003-10-19 01:42:28 »

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 Smiley

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Go get 'em!
Offline Murdockian

JGO n00b
*

Posts: 46


Java games rock!


« Reply #3 on: 2003-10-20 00:54:17 »

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
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.073 seconds with 19 queries.