Results 1 to 6 of 6

Thread: Java address book     submit to reddit submit to twitter

  1. #1
    Cerberus
    Join Date
    Oct 2008
    Posts
    436
    BG Level
    4

    Java address book

    Hey quick question on how the best way to do something would be. For our current project we have to make a GUI address book that works like a ugly version of any address book (gmail for example) Gotten pretty far on the project but one thing I need to do is save the contact information every time the program is closed, then load the information every time its opened. I know its going to have to be done using input/output files but what is the easiest way to code something like that? save each contact in an individual file? If i saved them as one lump file how would i load each individual persons information.

    thanks

  2. #2
    Chram
    Join Date
    Aug 2007
    Posts
    2,699
    BG Level
    7
    FFXIV Character
    Nours Sruon
    FFXIV Server
    Moogle
    FFXI Server
    Fenrir

    a .xml is probably what you're looking for, that or SQLite

  3. #3
    Cerberus
    Join Date
    Oct 2008
    Posts
    436
    BG Level
    4

    do you know a good tutorial for xml i haven't used them with java yet. Thanks

  4. #4
    Nidhogg
    Join Date
    Apr 2006
    Posts
    3,562
    BG Level
    7

    when i wrote java ( 4 centuries ago), i'd use serialization.

    http://java.sun.com/developer/techni...serialization/

  5. #5
    Cerberus
    Join Date
    Oct 2008
    Posts
    436
    BG Level
    4

    Haven't had a chance to read the article thurowly but looks perfect and explains how to do it ty

  6. #6
    Relic Horn
    Join Date
    Oct 2006
    Posts
    3,054
    BG Level
    7
    FFXI Server
    Cerberus
    WoW Realm
    Ravenholdt

    You can just save the info to a .txt and call the file i/o on close and open.