Question

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?

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top