There is a main method which have different textfields with the same KeyListener class
textfield1.addKeyListener( new TextfieldKeyListener() ); textfield2.a