Article View: borland.public.jbuilder.java.swing
Article #10120Re: R: Print in JBuilder
From: Tad Frysinger
Date: Tue, 09 Nov 1999 00:00
Date: Tue, 09 Nov 1999 00:00
78 lines
2723 bytes
2723 bytes
Try this link for some tips: http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/render.html Tad Frysinger (TeamB) Michele Gallucci wrote: > Hi John, > thank you for help and excuse me for my english !!! > I hope that you have some minutes for me. > > I use JBuilder 3.0. > > For jawa.awt.print.PrinterJob, I use: > > PrinterJob job,s; > Document doc; > > s=job.getPrinterJob(); > doc=TextField.getDocument(); > s.setJobName(doc.TitleProperty); > s.print(); > > With this istructions, the printer notifies that the document is received > but it don't print anything. > > For java.awt.PrintJob I can print the TextFiled as graphics object but I > cannot be able to print the contents of TextFiled. In fact, the istruction > is TextField.print(Graphics g). > So with the istructions > > PrintJob job; > Graphics graph; > Toolkit a=this.Toolkit(); > > job=a.getPrinterJob(this,"Prova", null) > graph=job.getGraphics(); > TextFiled.print(graph); > graph.dispose(); > > I receive a document with the draw of the TextField but I don't receive the > text contained in TextFiled ; > > Bye, > Michele Gallucci. > > John McLaughlin <johnm@oei.com> wrote in message > 7vv2qb$qn111@forums.borland.com... > > See either the java.awt.PrintJob class or the java.awt.print.PrinterJob > > class. The first was introduced in JDK1.1, is simpler to use, and seems > to > > work on many platforms. The 2nd is more complex and more flexible, but > > seems to be buggy (that's my experience anyway). > > > > John > > > > -- > > _______________________ > > John McLaughlin > > johnm@oei.com > > > > Michele Gallucci <mdata@tin.it> wrote in message > > news:7vutsr$qkl4@forums.borland.com... > > > Hi, > > > I hope you can help me!!! > > > I must send to printer the contents of a TextField. > > > Whit System.out.print(TextField.getText()), I send the text on monitor > but > > > how can I do to send the text to printer? > > > > > > Thank you > > > > > > > > > > > > > > > >
Technical Details
Message-ID:
<38283342.78B7EFA0@earthlink.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7vutsr$qkl4@forums.borland.com> <7vv2qb$qn111@forums.borland.com> <8013bg$a9d8@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,18bd15c9a2c15607 X-Google-Attributes: gid111d45,public From: Tad Frysinger <tfrysinger@earthlink.net> Subject: Re: R: Print in JBuilder Date: 1999/11/09 Message-ID: <38283342.78B7EFA0@earthlink.net> X-Deja-AN: 546459721 Content-Transfer-Encoding: 7bit References: <7vutsr$qkl4@forums.borland.com> <7vv2qb$qn111@forums.borland.com> <8013bg$a9d8@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: tfrysinger@earthlink.net Newsgroups: borland.public.jbuilder.java.swing