Results 1 to 3 of 3

Thread: "Find" screen

  1. #1
    glhansen is offline Member
    Join Date
    Mar 2009
    Posts
    20
    Rep Power
    0

    Default "Find" screen

    I would like to create a screen where a database is searched for a partial name or something, and all possible matches, like full names and addresses, are displayed in a scrollable area, and the user can double-click on one to select it.

    I can do the search part, and make scrollable areas, but I'm really not sure how to select a line like that. I suppose I could put little check boxes or something on the left side, but I want to do something that's more like an e-mail program or other database programs I've used.

    Thank you for any help.

    Greg

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    You could place your resulting Strings into a JList or JTable, and place that into a JScrollPane.

  3. #3
    glhansen is offline Member
    Join Date
    Mar 2009
    Posts
    20
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    You could place your resulting Strings into a JList or JTable, and place that into a JScrollPane.
    A JList looks just like what I'm looking for-- like the problem has been anticipated and solved before I even got to it.

    I've been using "Java in 21 Days" as my main tutorial, and the JList isn't even mentioned in there. But I have a big, black book from the library as a secondary reference, and they give sample code.

    Now that I know what to look for, I should be okay. Thanks.

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 03:03 AM
  2. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  3. Replies: 3
    Last Post: 11-06-2008, 04:24 PM
  4. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 12:12 AM

Posting Permissions

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