• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet in html page not reacting for keys

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic