user2824073
user2824073

Reputation: 2485

Serialize JTable's TableModel

I need to send the content of a JTable to a REST Service. For this purpose, I'd like to send the TableModel to the REST Service. However, I can see that the TableModel class is not Serializable.

Is there any other option other than copying the TableModel in a wrapper Java class (Serializable)?

Upvotes: 0

Views: 891

Answers (1)

Sergii Lagutin
Sergii Lagutin

Reputation: 10681

Usually table's row is dto. So you need send just collection of dtos using available marshallers (json, xml etc).

Upvotes: 2

Related Questions