Article View: borland.public.jbuilder.java.api
Article #3601Re: Printing from a TextArea
From: Noah Clements
Date: Fri, 21 Nov 1997 00:00
Date: Fri, 21 Nov 1997 00:00
18 lines
1101 bytes
1101 bytes
On Thu, 23 Oct 1997 11:14:35 -0500, Tres Seaver <tseaver@ect.enron.com> wrote: >Ask the TextArea to do the job for you: > > Graphics g = printJob.getGraphics(); > textArea1.paint( g ); > I tried this, as well as textArea1.print(g) and I got only a blank page. I get the toolkit from the frame, get a PrintJob from the Toolkit (passing the frame). I can't see that this works. My O'Reilly AWT reference says that these methods will not print the content of the text area, only the "look" of them (which will be blank). they suggest using fontMetrics and drawing the text on the graphics directly. Is this correct? Noah
Technical Details
Message-ID:
<34752a2b.1141401@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<344D1B0B.1A04CF6F@mbtinc.com> <344F77EB.B36033FA@ect.enron.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,61212f8d095833c1 X-Google-Attributes: gid1089d0,public From: DELETE_THIS.2clem@concentric.net (Noah Clements) Subject: Re: Printing from a TextArea Date: 1997/11/21 Message-ID: <34752a2b.1141401@forums.borland.com> X-Deja-AN: 291174365 References: <344D1B0B.1A04CF6F@mbtinc.com> <344F77EB.B36033FA@ect.enron.com> Organization: None Newsgroups: borland.public.jbuilder.java.api