Chapter 22
An Example Framework: The AWT and Swing
The AWT (the Abstract Windowing Toolkit) and the newer Swing library extensions are the portions of the Java run-time library that are involved with creating, displaying, and facilitating user interaction with window objects. The AWT is an example of a software framework. As we noted in Chapter 21, a framework is a way of structuring generic solutions to a common problem, using polymorphism as a means of creating specialized solutions for each new application. Examining the AWT will illustrate how polymorphism is used in a powerful and dynamic fashion in this library.
22.1 ⊡ The AWT Class Hierarchy
In Java, the class Frame
represents the Java notion of an application window, a two-dimensional ...
Get An Introduction to Object-Oriented Programming, 3rd Edition 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.