| Package | Description | 
|---|---|
| java.awt.print | Provides classes and interfaces for a general printing API. | 
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| javax.swing.text | Provides classes and interfaces that deal with editable
and noneditable text components. | 
| Modifier and Type | Method and Description | 
|---|---|
| Printable | Pageable. getPrintable(int pageIndex)Returns the  Printableinstance responsible for
 rendering the page specified bypageIndex. | 
| Printable | Book. getPrintable(int pageIndex)Returns the  Printableinstance responsible for rendering
 the page specified bypageIndex. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | Book. append(Printable painter,
      PageFormat page)Appends a single page to the end of this  Book. | 
| void | Book. append(Printable painter,
      PageFormat page,
      int numPages)Appends  numPagespages to the end of thisBook. | 
| void | Book. setPage(int pageIndex,
       Printable painter,
       PageFormat page)Sets the  PageFormatand thePainterfor a
 specified page number. | 
| abstract void | PrinterJob. setPrintable(Printable painter)Calls  painterto render the pages. | 
| abstract void | PrinterJob. setPrintable(Printable painter,
            PageFormat format)Calls  painterto render the pages in the specifiedformat. | 
| Modifier and Type | Method and Description | 
|---|---|
| Printable | JTable. getPrintable(JTable.PrintMode printMode,
            MessageFormat headerFormat,
            MessageFormat footerFormat)Return a  Printablefor use in printing this JTable. | 
| Modifier and Type | Method and Description | 
|---|---|
| Printable | JTextComponent. getPrintable(MessageFormat headerFormat,
            MessageFormat footerFormat)Returns a  Printableto use for printing the content of thisJTextComponent. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.