Print large frame
From: paulobsousa (paulobsousa_at_yahoo.com.br)
Date: 03/30/04
- Next message: Jose Rubio: "Re: Multiple start of Threads"
- Previous message: John: "Re: string manipulation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2004 19:29:47 -0800
Hello all,
I want to print a frame, but when I send for the printer the
impression cut in the in the margins.
Characteristics of Frame:
size width=671 x height=552
font monospaced , 12
my pagesize is width=612 x height=792
How do I do to print this frame?
Thanks,
Paulo Batista
The routine that I use to print is this:
----------------------------------------------------------------------------
PrintJob printJob = frame.getToolkit().getPrintJob(frame, "JTerm : ",
null);
if (printJob == null) return;
Graphics page = printJob.getGraphics();
Dimension size = frame.getSize();
Dimension pagesize = printJob.getPageDimension();
page.translate((pagesize.width - size.width)/2,
(pagesize.height - size.height)/2);
page.setClip(0, 0, size.width, size.height);
frame.print(page);
page.dispose();
printJob.end();
-----------------------------------------------------------------------------
- Next message: Jose Rubio: "Re: Multiple start of Threads"
- Previous message: John: "Re: string manipulation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]