You don't need an init () method in a Java application. It's only required in an applet (you must override it when you extend JApplet). Just add the key listener in the constructor of your JFrame or ...
The JavaBeans component model (and thus the Swing component set) is built upon properties and events. Properties have setter and getter methods for working with their values. Events require you to use ...