code, pre { color: navy; }
pre { border: solid gray 1px; margin: 1em 2em; padding: 1em; }
This question, “how to generate print preview of Java Swing
components,” is asked often on various discussion forums, because
currently (as of version 6) the Java SE doesn't have standard facilities for
building print previews. While working on the Swing Tutorial, I tried to address...