I need to implement a Java class that implements KeyListener
. However, I don't need a JFrame
or another awt/swing-based class. I only need a console application in Java.
I guess that I need to register my listener somewhere to let it working. How can I do this in a simple console application? I only find GUI-based examples.