0

enter image description here

I'm trying to save the user's selection into a text file, so that it can be loaded easily next time the user loads the application.

What would be the best way of doing so?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • 4
    If you want to save and retrieve user preferences check [Java Preferences API](https://docs.oracle.com/en/java/javase/11/core/preferences-api1.html#GUID-CEEFE98E-4AF7-4371-826F-2CF8BC9BA4BA) – seenukarthi Jul 29 '21 at 08:50
  • 2
    [This answer](https://stackoverflow.com/questions/7777640/best-practice-for-setting-jframe-locations/7778332#7778332) serializes the options into a text file using the `Properties` API. Having said that, there are a lot of ways to skin this cat, both with forms of data and places to save it to. By limiting it to a text file might mean ruling out a better way of serialization, e.g. as mentioned by @KarthikeyanVaithilingam. – Andrew Thompson Jul 29 '21 at 09:19

0 Answers0