Hi guys, If I wanted to, would I be able to save an objects state to disk
(on exit of program) and be able to exactly replicate the object next time
the program runs(by reading the disk when the program enters main())???

Its a bit easier to understand my question with an example : imagine if
there is a JFrame with a JTextArea inside, and the user types in some text
(in the JTextArea) and then exits the program.

I want to be able save the objects state to disk when the user exits and to
reload the objects state next time the user accesses the program,
[rather than going the common way and saving the text in the text area to
file (on exit) and reading it back into the text area(on entry),the reason
is that there are more complex gui components than just text areas at work
here!!]

an example of the logic would be like this :

public static void main(String args[]){

 try{
  JWordEditor jwe = Loader.load_Saved_Object_State();//static method

 }catch(Exception e){System.out.println("Could not find/load object
state!");}

}



_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to