Java AWT

Previous Chapter 17
Printing
Next
 

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.


Previous Home Next
PrintJob Class Book Index Printing Example

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java