I need to print the contents of a JEditorPane. The pane contains both text and highlights. I would like to somehow print the contents of the pane through a print dialog so that I can choose a printer. Also the JeditorPane is attached to a scrollpane which may be important in this regard. I am new at trying to print the contents from a gui component any help would be much appreciated.