Article View: borland.public.jbuilder.java.language
Article #19968Problem compiling simple print function
From: Scott Van Kirk
Date: Wed, 19 Nov 1997 00:00
Date: Wed, 19 Nov 1997 00:00
31 lines
1050 bytes
1050 bytes
Hi,
I have the following function which I call from a class which is a
descendant of Panel:
public void printImage()
{
Frame printFrame = new Frame();
PrintJob job = Toolkit.getPrintJob( printFrame, "print", null );
Graphics g = job.getGraphics();
paint(g);
g.dispose();
job.end();
printFrame = null;
}
For some reason, I get the following error in JBuilder:
Error (446) non-static method getPrintJob(java.awt.Frame,
java.lang.String, java.util.Properties) cannot be referenced from a
static context.
Does anyone have any idea why Jbuilder is considering this a static
context?
Thanks
Scott
Technical Details
Message-ID:
<34735CE5.B4EA8B7A@mho.net>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,93c189877a446614,start X-Google-Attributes: gidf74b3,public From: Scott Van Kirk <scott@mho.net> Subject: Problem compiling simple print function Date: 1997/11/19 Message-ID: <34735CE5.B4EA8B7A@mho.net> X-Deja-AN: 291006097 Organization: None Newsgroups: borland.public.jbuilder.java.language