My JTextPane contains an image which looks good on the screen but “blocky” when printed, why?
This problem occurs because your image is right for screen resolution, say, 72 dpi, but then printed at printer resolution, say, 288 dpi. Java uses the same 72 dpi coordinate system when printing, but it knows that the printer is at 4X higher resolution. So if you have a 72×72 image that displays as 1″x1″ on the screen, Java does a 4X pixel replication of the 72×72 pixels to get 288×288 pixels so as to print the same 1″x1″ on the page, which results in the blocky effect.