estoy tratando de serializar el document del JtextPane y me dice que no es serializable y tambien lo hice con el STyleDocument y me de el siguenet error....
Error IOException javax.swing.event.DocumentEvent$EventType
java.io.NotSerializableException: javax.swing.event.DocumentEvent$EventType
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutput Stream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1146)
at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1509)
at java.io.ObjectOutputStream.defaultWriteObject(Obje ctOutputStream.java:416)
at java.util.Vector.writeObject(Vector.java:1012)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(Object StreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutpu tStream.java:326)
at javax.swing.event.EventListenerList.writeObject(Ev entListenerList.java:240)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(Object StreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutpu tStream.java:326)
at TextEditor.TextEditor.esGuardadoDocumento(TextEdit or.java:599)
at TextEditor.TextEditor.guardarArchivo(TextEditor.ja va:674)
at TextEditor.TextEditor.jButton3ActionPerformed(Text Editor.java:478)
at TextEditor.TextEditor.access$200(TextEditor.java:3 1)
at TextEditor.TextEditor$3.actionPerformed(TextEditor .java:132)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6263)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3255)
at java.awt.Component.processEvent(Component.java:602 8)
at java.awt.Container.processEvent(Container.java:204 1)
at java.awt.Component.dispatchEventImpl(Component.jav a:4630)
at java.awt.Container.dispatchEventImpl(Container.jav a:2099)
at java.awt.Component.dispatchEvent(Component.java:44 60)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4168)
at java.awt.Container.dispatchEventImpl(Container.jav a:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475 )
at java.awt.Component.dispatchEvent(Component.java:44 60)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)
Código JAVA:
Ver original
Ya lo resolvi el problema es que tenia una clase que no era serializable!!!!!