Forum Stats

  • 3,872,525 Users
  • 2,266,437 Discussions
  • 7,911,237 Comments

Discussions

[SOLVED] String to KeyEvent

843807
843807 Member Posts: 46,582
edited Jun 1, 2010 10:23AM in Abstract Window Toolkit (AWT)
My application is listening to KeyEvent.VK_F11.

Now I want to put F11 in a properties file, but is it possible to get the KeyEvent from a String for example: "F11"?

Is there a method for this or should iterate through the possible KeyEvents?

Edit: I solved it by using KeyStroke instead of KeyEvent

Comments

This discussion has been closed.