Serializing swing/awt components
问题 I am trying to serialize a JPanel but everytime i get this error: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: javax.swing.GroupLayout Can you tell me, what could be the problem or what is the proper way of serializing it. What i do is pretty simple: FOR Serializing: FileOutputStream f = new FileOutputStream("myfile.dat"); ObjectOutputStream ostream = new ObjectOutputStream(f); Object object = panel; //where panel is a JPanel type object ostream