尝试在扩展和实现的类中将java.io.notserializableException
对象写入服务器后出现错误,但如果扩展它运行良好jpanel
serializable
jframe.
这是代码:
//to send to server
objectoutputstream out = new objectoutputstream(socket.getoutputstream());
out.writeobject(myobject);
//to receive in server
objectinputstream in = new objectinputstream(socket.getinputstream());
in.readobject();
谢谢你的帮助。