Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2005

Tip: Looking for answers? Try searching our database.

Serializing a JTable

Thread view: 
Stefan Ram - 10 Sep 2005 17:34 GMT
 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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.