Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet in html page not reacting for keys

 
Rudolf Hergat
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey

My friend have a problem with an applet and I coudln't help him. Here it is:

"I have a problem with an applet I put into an HTML page.

<applet id="applet" codebase="classes" code=Mappa/Jatek.class" width=800 height=600"></applet>

It's a game where the user controlls a stickman. Somehow the KeyPressed event doesn't seem to work and it doesn't react for the keys. Maybe the applet can't get the focus?

Thank you."

Thank you forwards for the answers.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's years since I worked on applets, but from what I remember, you need to click the applet to enable it to get focus. Can you try clicking it and see if it gets the key events?
 
Rudolf Hergat
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah we tryed it but didn't help. We asked a couple of ppl to try the applet on their own computers. Turns out, the ones who have jre 6 can use the applet properly, but those who have jre 7 can't move the character.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic