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.
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.
Originally Posted by Fubarable
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.