Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Saving current state of GUI to be opened later

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts

    Default Saving current state of GUI to be opened later

    How would I go about doing this? I have a program with a lot of objects (JButtons, JLists, Tabs, etc.) that I need to be able to save to a file during any time that my program is running and then be able to reopen the program and load the saved GUI. Afterwards, it still needs to be editable (meaning all of the objects eventhandler's and what not still function).

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Thanked 832 Times in 772 Posts
    Blog Entries

    Default Re: Saving current state of GUI to be opened later

    1) You could write a custom format, evaluate the state and save to file. Then read that state when you reopen. 2) You can serialize the objects. See
    Serializable (Java Platform SE 6)

Similar Threads

  1. [SOLVED] I need help with saving state data.
    By JonLane in forum Collections and Generics
    Replies: 6
    Last Post: February 27th, 2012, 03:48 AM
  2. Replies: 2
    Last Post: January 9th, 2012, 10:03 AM
  3. Resume Application in Original State
    By WhiteSoup12 in forum Android Development
    Replies: 0
    Last Post: November 22nd, 2011, 08:11 PM
  4. Replies: 2
    Last Post: November 17th, 2011, 08:03 AM
  5. State Variables interaction with outside classes?
    By Ace Coder in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 24th, 2010, 03:52 PM