Serializing swing/awt components

前端 未结 4 1082
执念已碎
执念已碎 2021-01-27 18:01

I am trying to serialize a JPanel but everytime i get this error:

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: javax.swing         


        
4条回答
  •  一个人的身影
    2021-01-27 18:19

    JPanel implements Serializable...

    But javax.swing.GroupLayout don't.

    So, you need to change GroupLayout to another layout class!

提交回复
热议问题