What is the Java programming code to cause an error on the press of a certain key? For example... If the program would be open and a person would press "Enter", I want a window to pop up or make it beep. I know how to make it beep but I dont know if there is like an
onKeyPress() method or something.
I hope I made this clear enough