Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JFileChooser : save as default file

843789May 30 2010 — edited Jun 3 2010
I have a JFileChooser which the user uses to pick an excel file that will be imported and displayed in a JTable. I'm looking for a way for the program to save the user's choice as the default, so that every time the application closes and is reopened, he won't have to re-pick the file (unless he is changing it). i'm already using the java.util.prefs class to save other preferences but it seems it only works for primitive data types and so i can't save a "file" to one of the nodes... is there some other way? or am i missing something in the java.util.prefs class?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2010
Added on May 30 2010
18 comments
699 views