12/06/2011, 02:11
|
| | Fecha de Ingreso: mayo-2011
Mensajes: 22
Antigüedad: 13 años, 6 meses Puntos: 0 | |
Error de consola al guardar object Estoy tratando de guardar en un fichero v3 objetos, los cuales son paneles con cosas dentro, imagenes, labels, scroll, son beans creador por mi.
Y deseo que el programa salve el estado de esos 3.
El codigo para guardarlo es el siguiente: (Decir q lo ejecuto desde un thread de swing)
//Abrir fichero
ObjectOutputStream salida=new ObjectOutputStream(new FileOutputStream(ruta));
salida.writeObject(gui_mesa);
//publish((int)paso);
salida.writeObject(gui_estanteria);
//publish((int)paso);
salida.writeObject(gui_album);
//publish((int)paso);
salida.close();
Cuando ejecuto el codigo escribe los ficheros(aun no se si bien), pero me muestra esto en consola. alguien sabe a que es debido? Puse implementes serializable a todas las clases, (no solo a las 3 que quiero guardar) pero el error sigue ahi, y no se si puede ser por algo del lookandfeel, pero lo quite y sigue saliendo.... GRACIAS
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.synth.SynthLookAndFeel.paintRegio n(Unknown Source)
at javax.swing.plaf.synth.SynthLookAndFeel.update(Unk nown Source)
at javax.swing.plaf.synth.SynthPanelUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubl eBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unkn own Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unkno wn Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unkno wn Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Un known Source)
at javax.swing.SystemEventQueueUtilities$ComponentWor kRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at es.unican.moses.apolo.ui.windows.DialogoGuardarEst ado.inicializar(DialogoGuardarEstado.java:195)
at es.unican.moses.apolo.ui.windows.DialogoGuardarEst ado.<init>(DialogoGuardarEstado.java:64)
at es.unican.moses.apolo.ui.windows.Apolo.guardar(Apo lo.java:314)
at es.unican.moses.apolo.ui.widgets.GUIAlbum$1.action Performed(GUIAlbum.java:79)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source) |