Results 1 to 5 of 5

Thread: Program help

  1. #1
    Destinationxx is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Program help

    Hello,

    I need to make a program which displays one picture from a selection of images within a directory which is fair enough.
    However, I also need to add a Text box where users may comment on this individual picture. They may then move on to the next or previous
    or whatever image they want. But the comment about that individual picture should be saved (even when the program is exited and re-run).

    I was wondering if any of you have any ideas as to what the best way to tackle this objective would be?

    as I know there are a few ways in which it could be done. Any help is appreciated greatly

    Thanks.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,418
    Rep Power
    25

    Default Re: Program help

    Design a GUI with the required fields.
    Design a class to hold a reference to the image and the comment.
    Where do you plan to save the data? Will you save a copy of the image file or just the path to the image file?

  3. #3
    Destinationxx is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Re: Program help

    I was thinking of some kind of Xml file or something which stores the path/name of the image(which are all uniquely identified by numbers already) and the comment. Something like that. So that when the image is loaded a check can be done of the xml file to see if there are any comments. This is the only way I could think of it anyway. Other than that I didnt know whether you could change the comment properties of the image in some way.

    Thanks.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,418
    Rep Power
    25

    Default Re: Program help

    There are many ways and formats for writing data to a disk file. As XML is one.
    You'd probably read the whole file into memory when the program started so checking for the comments would be an easy lookup in some collection.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,240
    Rep Power
    19

    Default Re: Program help

    But the comment about that individual picture should be saved (even when the program is exited and re-run).
    That's what databases are for.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2011, 12:57 PM
  2. Replies: 13
    Last Post: 03-22-2011, 06:49 AM
  3. changing my program to array working program
    By Chewart in forum New To Java
    Replies: 39
    Last Post: 11-18-2009, 06:53 PM
  4. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  5. Replies: 0
    Last Post: 10-04-2007, 09:33 PM

Posting Permissions

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