Results 1 to 3 of 3
  1. #1
    JohnnySPapa is offline Member
    Join Date
    Jul 2015
    Posts
    1
    Rep Power
    0

    Default Java - How to save user settings/configurations?

    I have written a javafx program, where the user can open a text file, the text file gets stored in a dynamic tableview and the user can add rows/columns, delete rows/columns, convert columns, move columns, change cell value...etc.
    How can I save all the user settings/configurations, so that for the next time the user has only to choose the source text-file and the configurations-file and it will be converted automatically..

    I don't even know how/where to start..

    I have searched for answers, but didn't found anything helpful...
    Last edited by JohnnySPapa; 07-25-2015 at 11:27 PM.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: Java - How to save user settings/configurations?

    There are several ways to do it. One is to store the configurations settings in a serialized object. This is rather advanced so I mention it just for reference. The other would be to store them in an XML file (less advanced). The simplest way is probably to store them in a text file in some format of your choosing. For example:

    row:10
    col:20
    font:arial,12,bold

    Then just read in the text file and apply the attributes as though the user had supplied them.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    27

Similar Threads

  1. Save user input
    By MMull1 in forum Android
    Replies: 1
    Last Post: 05-20-2014, 11:19 PM
  2. Save User Selection of UI
    By msambasiva in forum AWT / Swing
    Replies: 2
    Last Post: 09-09-2013, 11:33 AM
  3. How to make a Java Console Program save user made changes?
    By Chad.Curtiss in forum New To Java
    Replies: 3
    Last Post: 07-14-2012, 08:58 PM
  4. save user input
    By ardel in forum New To Java
    Replies: 9
    Last Post: 02-15-2011, 04:26 AM
  5. User settings
    By 3speed in forum New To Java
    Replies: 8
    Last Post: 10-31-2008, 12:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •