Update PrintHTML.java

Added thrown exception and dispose of  JFrame in order to avoid incorrect pop over display/ behavior