The Java tutorials: How to write a Key Listener