If a key is pressed or the mouse is moved etc. the information needed is send to VM (by the OS) and passed on to the component responsible for it. The component builds some event object and sends it to the Listeners where the event is handled.
But there are event sending methods - they are named
fire...
. So user created events are possible and may be useful.