Having looked at the API documentation for javax.print, that package appears to be mostly dedicated to getting something which is already in printable form to a "printer". It leaves it up to other code to produce a
Doc object which can be printed. Therefore Swing has some code whose purpose is to do that, and that's the code you don't like.
I remember when I used the java.awt.print classes to print data, I noticed that it laid out the text really badly: letters were the wrong width and overlapped the adjacent letter, or there were excessively large spaces between letters. That was about 10 years ago and I couldn't find any way to deal with so I just left it alone. I never printed anything much so it didn't really annoy me. But now when I try my old code, the text comes out perfectly. I don't know what changed in the meantime (except for upgrading from
Java 4 or 5 to Java 8).