This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
as keycode() returns an int, perhaps all you need to do is something like this
and to check
Joined: Jul 22, 2012
What i'm trying to do is get the keycode for a string.
e.g If the string says "a", i want to return the integer for that, which is KeyEvent.VK_A, or 65.
I already found a way to do this, but it's really long and i have to write out every letter of the alphabet 3 times.
Joined: Jun 09, 2003
you can simplify it a bit
if(i.equals("A") || i.equals("a"))
can be done
or, in my earlier post
and the test: