Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1506
| From | "SwingGuy" <swingguy@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Weird Java 6 Double-buffe |
| Message-ID | <SM7Wh.101239$Yr.27152@fe21.usenetserver.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:33 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui I'm having a printing issue since upgrading my Swing app from JDK1.4.2_06 to JDK6.0 (b105). I think its double buffer related. As many of you may know, before printing, one must disable double buffering. This reduces the amount of data sent to the printer as well as improving quality drastically because the double buffer at low res monitor resolution is printed to a high resolution device -- end result is pixelated blurry text and lines on paper! Ever since I upgraded my app, my JTable components have been experiencing this exact problem. I've set double buffering off *globally* using the call: RepaintManager.currentManager(null).setDoubleBufferingEnabled(false); I confirmed that double buffering is disabled both by setting breakpoints in my JTable cell renderer and noticing that my app flickers badly with any onscreen rendering. Yet, my output to the printer for *just* JTable components is pixelated and blurry! Here's one more damning piece of evidence. If I print to a virtual device like my Adobe Acrobat PDF generator, the resulting output has blurry text and lines just the same. Interestingly, while I'm *scrolling* the PDF document, I can see it draws a *razor* sharp vector-based text and lines for just a split second (I zoom in at 500% view to exaggerate the effect). But then the razor sharp vector drawn image is almost instantly covered up with low-res raster copy which I presume is the on-screen double buffer coming in on top of what was drawn first. What is going on here? Has Java 6 changed double buffering in some way? Or is something else at work here causing this problem? The only thing I can think of is that double buffering is getting enabled somehow, without my knowledge, just for the duration of Swing's rendering for print output. How can that happen? Some technical details: - I am printing a composite component with JLabel, JTable, JButtons - Everything else is sharp and blurriness only happens on JTable rendering. If the JTable doesn't break across the page, it is printed sharp! Weird. - I have a simple custom table cell renderer for each cell of the table. I am overriding paintComponent(...) for custom rendering Help! --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread
Weird Java 6 Double-buffe "SwingGuy" <swingguy@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
csiph-web