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.