When i read the api about the streams here is what they say
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.
After reading this i decided to serialize my jtextpane objects using the above xml format but could not get it to work
I am providing a ruunable example so you guys can compile the source code and see what i mean
When i insert an icon put in some styled text and change the background color of the jtextpane the file is written to disk with no exceptions but when i try to read back the same file only the previously background color is reloaded but the styled text and embedded icon are gone.