Very easy, just define a class that implement the Printable interface and then import that class and use the print() method.public class myPrintable implement Printable {public int print(Graphics gr, PageFormat pf, int pageIndex) throws Exception { super(gr, pf, pageIndex);}