Just query the keyCode in the keyPressed or keyReleased method to find out which button was clicked.
Have a look at this page for some details.
thanks for your reply! unfortunately it didn't get me all the way... i'm extremely new to java, and so far i've done everything in some sort of "design view" in netbeans 6. i took a look at the page and understood some of it, but when i tried to insert the
- protected void keyPressed(int keyCode){}
method i just got errors everywhere...
do you know any way to insert this method in the right place through some menu or "toolbox" in the netbeans ide?