printing AWT Graphics [message #464858] |
Wed, 30 November 2005 18:58 |
Eclipse User |
|
|
|
Originally posted by: ng.felicis.org
Hello together,
I've got an older AWT component within my SWT application that renders an
image that can be printed out. Unfortunately this code starts the Swing
printer dialog and I would like to see the native printing dialog instead.
But I don't know how to translate some portions of the AWT code -- maybe
someone may assist me?
Basically it is this portion:
Toolkit tk = Toolkit.getDefaultToolkit();
PrintJob pj = tk.getPrintJob(new Frame(), "", null);
if (pj != null) {
Graphics g = pj.getGraphics();
this.printProfil(g);
addPrintInfos(g, this.pi[0], this.pi[1], this.pi[2]);
g.dispose();
pj.end();
}
How do I translate the "getGraphics()" Function and the corresponding
"getPrintJob()" to SWT?
Has anybody an idea?
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.04759 seconds