The sample_code directory contains several applications which make use of the JPDF
to implement various printing functionality. These Sample Code Applications demonstrate a small
subset of the capabilities of the JPDF. The JPDF Demo can be used to gain a fuller appreciation
of these capabilities.
Each Sample Code Application is contained in a separate subdirectory of the
sample_code directory. Each subdirectory contains a batch file suitable for
executing the application in a Windows environment. You may need to modify these batch files
to specify the path to the JRE on your workstation. The Java source-code files for these applications
contain comments which provide an explanation of the JPDF API calls that are made.
The Sample Code Applications are briefly summarized in the following table.
| Name/Component | Description | ||
|---|---|---|---|
PreviewOffscreenHtml
javax.swing.JEditorPane
|
Displays a Swing Editor Pane (JEditorPane) containing HTML in a Preview Dialog. The Page Setup and Print dialogs can be displayed from the Preview Dialog. This application demonstrates the ability to preview and print an off-screen text component. | ||
PreviewOffscreenTable
javax.swing.JTable
|
Displays a Swing Table (JTable) in a Preview Dialog. The Page Setup and Print dialogs can be displayed from the Preview Dialog. This application demonstrates the ability to preview and print an off-screen table. | ||
SetupPreviewPrintHtml
javax.swing.JEditorPane
|
Displays a window containing HTML in a Swing Editor Pane (JEditorPane), and three buttons:
|
||
SetupPreviewPrintTable
javax.swing.JTable
|
Displays a window containing a Swing Table (JTable), and three buttons:
|
||
SetupPreviewPrintTree
javax.swing.JTree
|
Displays a window containing a Swing Tree (JTree), and three buttons:
|
||
SetupPreviewPrintStylepad
javax.swing.JEditorPane
|
|
A purchase of the JPDF includes many additional Sample Code Applications which demonstrate the more advanced capabilities of the software.