Article View: borland.public.jbuilder.java.swing
Article #10196R: Print in JBuilder
From: Michele Gallucci
Date: Sat, 06 Nov 1999 00:00
Date: Sat, 06 Nov 1999 00:00
73 lines
2326 bytes
2326 bytes
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:
<8013bg$a9d8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7vutsr$qkl4@forums.borland.com> <7vv2qb$qn111@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: "Michele Gallucci" <mdata@tin.it> Subject: R: Print in JBuilder Date: 1999/11/06 Message-ID: <8013bg$a9d8@forums.borland.com> X-Deja-AN: 545162958 References: <7vutsr$qkl4@forums.borland.com> <7vv2qb$qn111@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing