I have been havign allot of difficulty tryig to work out how to use the KeyListener methods for the 9210i(Java). i made a simple enough program and added a keylistener to the main frame then made methods to listen to the presses like KeyPressed etc...
public blah()
{
...
...
addKeyListener(this);
...
}
....
...
public void KeyPressed(....)
{
...
}
now this all works fine BUT i have buttons in the main frame and tghey take focus unless u actualy turn on the pointer and point to the frame(outside of the buttons) only then does the keylistener work, and then a nother problem occurs.
I want to be bale to detect the use of the arrow keys UP DOWN LEFT RIGHT(the joystick thingy) when i press any of these keys(UP DOWN LEFT RIGHT) the keylistser returns a:
UKNOWWN KEY STROKE ['?']
does anyone knwo how to solve both or one of these problems???
1-make the entire program be able to listen to keys(not just the main frame an dnot by asigning a key listener to every object in the frame)
2-detectgin the arrow keys