开发者

How to implement autoload in a Java application

开发者 https://www.devze.com 2022-12-08 06:47 出处:网络
So I\'m writing this JFrame application that has its own document model that can be loaded and saved to a开发者_开发百科 filepath. I\'m wondering what good ways are there to make the application open

So I'm writing this JFrame application that has its own document model that can be loaded and saved to a开发者_开发百科 filepath. I'm wondering what good ways are there to make the application open the last saved file when it starts up.

Do I store last saved document filepath in a proprietary way or is there some facility in java that can handle this for me?


Why not use the Java Preferences API ?

That allows you to store settings/properties per user and/or per system. They'll be persisted automatically (via files in Unix/Linux, and in the registry in Windows, IIRC).

0

精彩评论

暂无评论...
验证码 换一张
取 消