Article View: borland.public.jbuilder.java.language
Article #16541Printing a Frame
From: Robert Smith
Date: Wed, 10 Feb 1999 00:00
Date: Wed, 10 Feb 1999 00:00
24 lines
1218 bytes
1218 bytes
Here's the problem. I create a new Application, put an awt button in the
Frame and use this code to print the Frame
void button1_actionPerformed(ActionEvent e) {
if(e.getSource() instanceof Button){
PrintJob job = getToolkit().getPrintJob(this, "Print
Test",(Properties)null);
if(job != null){
Graphics pg = job.getGraphics();
if(pg != null){
printAll(pg);
pg.dispose();
}
job.end();
}
If I have specified jdk1.1.6 the Frame gets printed minus the top control
bar ie.. no Title or close X etc. If I specify jdk1.1.7b the frame is
printed BUT the top and left side of the Frame is cropped. Anyone have a
clue what I am doing wrong... or what I should be doing but am not?
Thanks
Bob
Technical Details
Message-ID:
<79t1ag$dhk7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5aeaab881a813157,start X-Google-Attributes: gidf74b3,public From: "Robert Smith" <rds@spawar.navy.mil> Subject: Printing a Frame Date: 1999/02/10 Message-ID: <79t1ag$dhk7@forums.borland.com> X-Deja-AN: 442987227 Organization: Spawar Systems Center X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Newsgroups: borland.public.jbuilder.java.language