JDK-6201884 : JTable printed text is dithered when using Ocean theme
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-11-30
  • Updated: 2010-05-08
  • Resolved: 2004-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u2Fixed 6 b16Fixed
Related Reports
Relates :  
Description
On many printers (for example - NT 4, SP 5 with a Lexmark Optra S 2450, Linux with an HP LaserJet 3015) the text in the cells of JTable is dithered. This makes the output less professional than desired. This problem has also been seen in our prototypes for text printing.


Comments
EVALUATION Thanks to ###@###.###, the cause of the problem has been discovered. The problem is that the new Ocean theme uses the color (53, 53, 53) to represent black. To deal with this gray color, many printers need to either half-tone or dither. While this color is ideal for the screen, it appears not to be for printers. The solution we're investigating at this time is the idea of replacing this color when we detect that the component is being rendered to the printer. ###@###.### 2004-11-30 18:31:28 GMT The other solution being investigated is having the (upcoming) JComponent.print/isPrinting combination fire a property change event. The UI classes can listen for this change and swap the foreground color on the component. ###@###.### 2004-11-30 18:33:09 GMT As part of the investigation on this bug a few members of our team, and ###@###.### of Java 2D, met to discuss this problem. Resulting from that discussion a new approach was considered. What we found interesting was the idea of providing a facility to create a Color object that wraps an alternate color to be used during printing. Ideally such a facility would be made public and both we and developers could use it for any painting. I've filed a new RFE, 6203299, for such a facility. For now, we'll use such an approach, but in a private manner. That is, Swing will have a new implementation-only class that will wrap a second printing color. Ocean will use this class to specify that Color.BLACK replace it's quasi-black color when printing. These wrapped colors will be detected in Swing's text painting code, which all flows through SwingUtilities2. ###@###.### 2004-12-02 19:34:10 GMT
30-11-2004