Sample Swing Components

The JPDF provides a capability to preview and print Java Swing components of various types -- including Text Components (JTextPane, JTextArea, and JEditorPane), Table Components (JTable), Tree Components (JTree), and Panel Components (JPanel).  Additionally, a list of components can be arranged, previewed, and printed as a single document.

The Demo allows you to preview and print the included Sample Swing Components.  To do this, click one of the links displayed to the left.  The component for the selected link will be displayed.  For some of these components, additional controls will be displayed in the toolbar.  These additional toolbar controls allow you to interact with the displayed component in some way (e.g. change its background color).

Preview

When you are ready, press the Preview Button () to display the selected component in the JPDF Preview Dialog.

Page Setup

The Page Setup Button () -- located in the Preview Dialog toolbar -- can be pressed to display the Page Setup dialog.  The Page Setup dialog allows you to apply various print-rendering options to the preview display.

Print

The Print Button () -- located in the Preview Dialog toolbar -- can be pressed to display the Print dialog and to print the selected component.