[Chapter 17] 17.3 Component Methods
Author: John Zukowski
Date: Thu Jul 31 14:58:08 1997

#

| Chapter 17 Printing |

## 17.3 Component Methods

The methods that start the printing process come from either the `Component` or `Container` class and are inherited by all their children. All components inherit the `printAll()` and `print()` methods. Containers also inherit the `printComponents()` method, in addition to `printAll()` and `print()`. A container should call `printComponents()` to print itself if it contains any components. Otherwise, it is sufficient to call `printAll()`.

These methods end up calling `paint()`, which does the actual drawing.

PrintJob Class |  | Printing Example