Or use JDO to persist your object model... David Jordan mailto:[EMAIL PROTECTED] Object Identity, Inc. www.objectidentity.com
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Bobby Woolf > Sent: Wednesday, June 25, 2003 11:33 AM > To: [EMAIL PROTECTED] > Subject: RE: [Juglist] Saving/Reloading an object's state. > > > Neil, > > Both Serializable and XML serialization are good approaches. > > I would not suggest trying to serialize (e.g. persist) GUI > component objects > (such as JFrame and JTextArea). Rather, what will work better > is to perist > the data that the GUI is displaying. You should be using a > Model-View-Controller approach where the "model" is the data > that you want > to display and the "view" (and controller) are the GUI you're using to > display the data. You don't really want to persist the > display; you should > open a new one each time the user runs your program. OTOH, > you do want to > persist the data so that it's available next time. > > If your data is as simple as a big string, you can simply > write that to a > text file. If your data is a more complex object model, then > you'll want to > persist your object model by serializing it. > > Bobby > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of neil > Sent: Wednesday, June 25, 2003 10:39 > To: [EMAIL PROTECTED] > Subject: Re: [Juglist] Saving/Reloading an object's state. > > > I can Serialize/Deserialize small objects easily, but I get a > 'StackOverFlowError' if I try to Deserialize a complex > gui.(the Serialize > works fine, I assume, because no exceptions were thrown!); > > > > _______________________________________________ > Juglist mailing list > [EMAIL PROTECTED] > http://trijug.org/mailman/listinfo/juglist_trijug.org > > > > _______________________________________________ > Juglist mailing list > [EMAIL PROTECTED] > http://trijug.org/mailman/listinfo/juglist_trijug.org > _______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
