What is a Pageable?
Pageable is a Java 2 interface that is part of the Java JDK as defined by Sun and which appears in the package java.awt.print . Pageable defines a set of paginated pages, i.e., a indexed sequence of printable pages. Pageable requires 3 implemented methods: getNumberOfPages() specifying the number of pages in the Pageable, getPrintable(int n) specifying the Printable (a Java 2 class that prints a single page) for the nth page, and getPageFormat(int n) specifying the PageFormat (another Java 2 class that describes the paper characteristics, i.e., orientation, size, margins) on which the nth page is to be printed. Printing a multi-page document in Java requires implementing a Pageable for your document content. This requires that you calculate in advance all the page breaks for your document content (not an easy task). J2PrinterWorks contains a number of components such as J2TextPrinter, J2TablePrinter, J2TreePrinter, J2ListPrinter, J2ComponentPrinter, and J2PanelPrinter that will take an