• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

keyboard controls for applet buttons.

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I want to control the applet buttons in my web page using keys without mouse.when I used swing buttons i used button.setMnemonic('a').when I press alt+a, it was working.but when i used the same property in applet buttons it is showing the following error."The method setMnemonic(char) is undefined for the type Button".what is the method to control over keys in applet.anyone help me please.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setMnemonic exists in the javax.swing.JButton class, but not in java.awt.Button. Can you use Swing in your applet? Then you could use the same Swing buttons that you've used elsewhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic