First, I want to thank Michael Dunn for his answer to my last
question!
A user can reorder the columns of a JTable; and he can change
their width. Now, I am about to write code to serialize these
properties into a text format, so that I can read them the
next time the program is started.
If something like this has already been done, please let me
know, so that I can look at the code to see which properties
needs to be saved and restored, to reestablish all user
modifications to the table layout.
Roedy Green - 11 Sep 2005 02:09 GMT
> A user can reorder the columns of a JTable; and he can change
> their width. Now, I am about to write code to serialize these
> properties into a text format, so that I can read them the
> next time the program is started.
One problem with serialising the whole thing is you might not be able
to restore it under any other version of Java.
We had a similar question a day or so ago. You might want to check out
the responses there. It was titled "How to save a layout" in
comp.lang.java.gui.
I suggest collecting the crucial state control variables and
persisting them with the Preferences mechanism.
Just serialise the TableModel if you need that.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.