Integrated: 6441373: Editing JTable is not Serializable
Sergey Bylokhov
serb at openjdk.org
Mon Feb 9 21:38:28 UTC 2026
On Tue, 20 Jan 2026 09:12:44 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> The patch implements serialization for editable JTables. Currently, most classes responsible for JTable editing are not serializable, so trying to serialize them causes an exception. The patch has two parts:
>
> - The editable JTable is reset to non-editable using the common pattern stopCellEditing + cancelCellEditing. This is added to the compWriteObjectNotify method, which acts as an entry point for serialization of Swing components. It allows actions to be performed before the parent classes are serialized.
>
> - The editing coordinates for all JTables are reset to -1. Before this patch, even non-editable JTables had their coordinates reset to 0 from -1 because the fields were transient.
This pull request has now been integrated.
Changeset: f9ded7f8
Author: Sergey Bylokhov <serb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f9ded7f88cce75151cec32d1ef1f9662ea10431a
Stats: 174 lines in 2 files changed: 174 ins; 0 del; 0 mod
6441373: Editing JTable is not Serializable
Reviewed-by: psadhukhan
-------------
PR: https://git.openjdk.org/jdk/pull/29313
More information about the client-libs-dev
mailing list