Creating new GUI components in real time
I am working on an app that returns anywhere from 10-100 (maybe more) search results (just text) to the user. Currently I have the results popping up in a JTextArea one at a time, as it is easy to update the TextArea in real time and make it scrollable. But now I want there to be a clickable button with each result. I imagine the results would show up in a virtual index card with a button on each one, and that all of the index cards would be on one scrollable "sheet".
I tried making index cards out of JPanels and adding them to a JPanel within a JScrollPane one by one, but they didn't show up. Do you think this was just a threading problem or is it impossible to add an indefinite number of components to a JPanel in real time?
Any suggestions? I thought I might make my index cards out of internal frames, but is there any way to make them scrollable? I don't want 100 frames all stacked up in the main window; that would be too messy.
Thanks!

