|
One way to go about it would be to create a class that extends JTextArea and implements Printable.
Then you could just add a print() method, that calls printJob.setPrintable(this) along the way.
In the 1.6 JDK, all classes that inherit from JTextComponent have support for printing by default, so you won't have to do this anymore.
|