CHAPTER 21

EVENT HANDLING AND AWT

Older computing models revolved about the console input and output. In modern days we (most of the time) use GUI and various components like buttons, scroll bars, and textboxes. Programming model has also changed to event-driven programming. It has made events very important. In this chapter, we will be studying events and event handling.

Events are strongly associated with components. It will not be prudent to study event handling without studying the components. For this purpose, we have to get familiar to components. This requires that we study a very useful package called Advanced Window Toolkit known by the acronym “AWT”.

As of today, Java recommends using swing package for GUI. The majority of components ...

Get Programming with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.