This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes saving settings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "saving settings" Watch "saving settings" New topic
Author

saving settings

tomo black
Greenhorn

Joined: Mar 01, 2004
Posts: 11
hi, i have designed a GUI which accepts user input. i would like to be able to save these values, so that the next time the user runs the application, they do not have to re-enter those values again but can retrieve them from a menubar option.
i am not really sure how to go about this task. I was going to use java.util.Properties to do this. is this the right way to go or is there a better way?
any help would be much appreciated.
thanks in advance
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Yes, java.utils.Properties is the way that this is usually done. Here is the section on Properties in the Java tutorial if you need any help on this. A new class, java.util.Preferences, was added in 1.4 that provides a more hierarchical preferences scheme, but Properties should be good for most things.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: saving settings
 
Similar Threads
setting a row value
monitor changes - log only the actions.
problem in forms..
get data from html tables and send it to controller/servlet
clear session scoped variable values