Summary

The rubberband test application serves as a good reminder that all graphical activities in the AWT occur in a Component. All the work is accomplished by the use of a component's Graphics object.

We have discussed one of the cornerstones of object-oriented software development—refactoring existing code. One of the principal activities of refactoring is to identify basic abstractions that have been implemented in specialized code. Once the basic abstractions have been identified, they are extracted from the specialized code and placed in a class (or classes) of their own, and the original specialized code is refactored to use the newly created classes.

Get Graphic Java™ 1.2, Volume I: AWT, Third 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.