Results 1 to 2 of 2
  1. #1
    GOhD is offline Member
    Join Date
    Jun 2010
    Rep Power

    Default searching in a saved file

    how to display data from a saved file...somthing like a search menu

    ex if i have 3 names with a common first name, how can i get all of the names to
    print onto the screen

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    There are a lot of unknowns, but assuming (and I always get into trouble doing this) you have a simple text file, then I suppose you'd read the file in, hopefully creating objects as you do your reading, and possibly place the objects into an array list. Then you could sort the array list, search it, and extract information as needed. I'm sure that there are other/better ways to do what you want, but I think that for all of us to discuss things in more detail, you may want to first give the details of your problem domain.

    Much luck and welcome to the java-forums!

Similar Threads

  1. Help with reading / searching a .txt file
    By Absolute in forum New To Java
    Replies: 0
    Last Post: 03-11-2010, 05:39 AM
  2. Searching XML file using DOM
    By simon in forum XML
    Replies: 5
    Last Post: 03-30-2009, 01:27 AM
  3. Searching a string from a text file using Swing Buttons
    By in forum AWT / Swing
    Replies: 2
    Last Post: 09-15-2008, 09:50 AM
  4. Searching a String from Text file using Swings .
    By in forum AWT / Swing
    Replies: 4
    Last Post: 09-09-2008, 05:29 AM
  5. returning to a previously saved view
    By gojava in forum Advanced Java
    Replies: 0
    Last Post: 11-09-2007, 05:11 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