howPrint.put( "awt.print.destination", "printer" );
// could be "printer" or "file", default "printer"

howPrint.put( "awt.print.fileName", "TEMP/TEMP.PRN" );
// file to receive the PostScript or other physical printer commands

howPrint.put( "awt.print.numCopies", "1" );
// default 1

howPrint.put( "awt.print.orientation", "portrait" );
// could be "portrait" or "landscape", default "portrait"

howPrint.put( "awt.print.paperSize", "letter" );
// could be "letter","legal","executive " or "a4". default "letter"

howPrint.put( "awt.print.printer", "lp" )
// name of command/utility that will do the printing

howPrint.put( "awt.print.options", "" );
// options to pass to the print command/utility

PrintJob pj = getToolkit().getPrintJob(theFrame, "Print Test #1", howPrint );
Graphics pg = pj.getGraphics();
printAll( pg );
pg.dispose();
pj.end();