What you are using are keyboard listeners. As I mentioned above, there are different types of listeners, some will listener for events from the keyboard, others from the mouse, you even have listeners to look for a file to complete loading.
In any case, a listener is just a piece of code that is directed to wait for a specific event. For example, a mouse listener
obj.addEventListener(MouseEvent.CLICK, something)
This will keep an eye out for the mouse to be click on the specific object (obj), and when it does it fairs off an event to the specific function (something). They are extremely handy when you want your application to perform a task based on a mouse or keyboard action.




Reply With Quote
