O'Reilly logo

Programming with Java by Sunil Patekar, Mahesh Bhave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required