The printing of swing classes is implemented in such a way that it is grossly inefficient, resulting in much larger than needed memory consumption/file sizes. The best way to see this is to take a large swing application and print it. Swing comes with the swingset applet, you can try that in the appletviewer. Print it. Try to print it to a file. The file grew to 411mb before I ran out of memory. I didn't try adding memory to the vm because of the size of the file.