>. How to save it onto a file and load back it
>onto a new JTextPane?
do a getText and save that the way you would any other string,
perhaps with a Writer, a ObjectStream, or a DataOutputStream.
see http://mindprod.com/applet/fileio.html
for sample code.
Don't try to serialize the JTextPane itself. You won't necessarily be
able to read it back under a different version of Java.

Signature
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com