I would like it if anyone would post some really good tutorials on printing the contents of a JTextPane.

One of the main things I am looking for is printing the selected text and the selected page numbers.