Article View: borland.public.jbuilder.java.swing
Article #10246Re: Printing Problem with Swing
From: Zippy
Date: Wed, 03 Nov 1999 00:00
Date: Wed, 03 Nov 1999 00:00
54 lines
2646 bytes
2646 bytes
Like I said re-write the imageUI - rather then painting the image pixilate it and use the draw the points on the graphic... heres a snippet that will get you going the right way. Graphics2D tg=(Graphics2D) g.create(rec.x,rec.y,rec.width,rec.height); tg.scale(0.5,0.5); Image mi =ic.getImage(); int[] pix=new int[ic.getIconWidth()*ic.getIconHeight()]; PixelGrabber pg=new PixelGrabber(mi, 0, 0, ic.getIconWidth(),ic.getIconHeight(), pix, 0,ic.getIconWidth()) ; Sorry the whole thing isnt perfected yet.. Hopefully once I finish customizing JBuiler... well not so much customizing maybe making it operational is a better term... Well once I get a day to spend on this class I will post it.... >Ravi, > >I also experience these issues with a huge (and therefore understandibly >slow) print queue. > >I also am getting no image output on pages 2-n under JDK 1.2 & 1.2.2 (but >1.3 beta prints all pages). And finally, I am also experiencing some thin >bands of no-image (something like a printer toner problem) on the output >(although the printer is fine). > >If you get any insight into these issues I would love to hear from you. > >_______________________ >John McLaughlin >johnm@oei.com > >Ravi <ravi@gseindia.com> wrote in message >news:381ED993.5480CF27@gseindia.com... >> Hi all, >> >> I have a problem in printing using Swing components and Printer >> Job. I have a panel with swing components - labels and check boxes. I >> move values to these controls and call the PrinterJob class's print >> method. >> 1. The printer spooler file grows to 30MB. Is this reasonable? Is there >> a way around it? Or am I missing something? >> >> 2. It takes 3 minutes to spool (because of the big size?). >> >> 3. The printout comes with a grey background. The panel color is set to >> white. How to avoid this grey background? >> >> Thanks for anyhelp. >> >> >> >
Technical Details
Message-ID:
<3822be99.2708331@news.pangea.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<381ED993.5480CF27@gseindia.com> <7vn76e$f2e2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,f33890880dac8f3 X-Google-Attributes: gid111d45,public From: Zippy@Pangea.ca (Zippy) Subject: Re: Printing Problem with Swing Date: 1999/11/03 Message-ID: <3822be99.2708331@news.pangea.ca> X-Deja-AN: 543818453 Content-Transfer-Encoding: 7bit References: <381ED993.5480CF27@gseindia.com> <7vn76e$f2e2@forums.borland.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@pangea.ca X-Trace: pumpkin.pangea.ca 941605502 31239 207.161.110.34 (3 Nov 1999 05:05:02 GMT) Organization: Oats Mime-Version: 1.0 Reply-To: Zippy@Pangea.ca NNTP-Posting-Date: 3 Nov 1999 05:05:02 GMT Newsgroups: borland.public.jbuilder.java.swing