Serializing a JFrame and sending via network

后端 未结 4 930
予麋鹿
予麋鹿 2021-01-24 08:03

What I\'m trying to do is to send a JFrame through sockets. The problem is after I send the form and press the button to view it I get the below exception.

4条回答
  •  再見小時候
    2021-01-24 08:20

    What I'm trying to do is to send a JFrame through sockets

    Why? From the Javadoc for JFrame:

    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.

    Don't just ignore these warnings. They are there for a reason.

提交回复
热议问题