The Event-driven programming allows the program to react to various inputs or events.
The action on a graphical component is an event. For illustration, clicking on a command button is an event. The Event-driven program makes the use of an event handler and the dispatcher. The dispatcher waits for an event to happen and that event calls the event handler.