Comments

: I'm sorry for posting a topic that may have already been posted, but I REALLY need help!: : how do you get it so that if a user presses a key, such as 's', a message is displayed via terminal that says something like, "you pressed s!!!"???: : Any help would be GREATLY appreciated,: Implement the KeyListener interface. That interface defines a keyPressed() method, which is fired if the user presses a key.

: : Implement the KeyListener interface. That interface defines a keyPressed() method, which is fired if the user presses a key.: : : : I'm sorry, but I am not too adept at programming in Java. Frankly, all I know is a semester course. If you would be so kind to give a code example, I would be extremely thankful.: I myself also just took an introduction course in Java programming, but EventListeners were among the first things we learned. Here is the basic code, the you should look in the javadoc for the rest:[code]public class MyApplet extends Applet implements KeyListener{ public void init() { thiss.addKeyListener(this); }