Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » printing AWT Graphics
printing AWT Graphics [message #464858] Wed, 30 November 2005 18:58
Eclipse UserFriend
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
Previous Topic:How to flash the icon in the Windows taskbar?
Next Topic:TraverseListener
Goto Forum:
  


Current Time: Fri Apr 26 16:32:39 GMT 2024

Powered by FUDForum. Page generated in 0.04073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top