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:

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();
addPrintInfos(g, this.pi[0], this.pi[1], this.pi[2]);

How do I translate the "getGraphics()" Function and the corresponding
"getPrintJob()" to SWT?

Has anybody an idea?

Previous Topic:How to flash the icon in the Windows taskbar?
Next Topic:TraverseListener
Goto Forum:

Current Time: Sun Apr 18 00:40:11 GMT 2021

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

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

Back to the top