Adam Grey wrote:I want the table from SearchBooks to be passed to the UserInterface class.
Get rid of the unnecessary frames now. You won't figure the code out until after you have cleaned up those references.
Adam Grey wrote:. . . I will clean up the JFrame references after I figure this out. . . . .
SearchBooks is a bad name for a class. BookSearcher would be better. I presume that class is completely distinct from your GUI code. Don't mix business logic and GUI display code in the same class.
I am trying to keep all my business logic in the SearchBooks function . . .
Event Dispatch Thread. Link.
What do you mean by EDT?
Don't give child components bounds. Use a layout manager object. Don't add the table after you have set the frame visible. Add every component first, then set visible. I can never remember how to populate a table, but you will find the details in the Java™ Tutorials.
. . . Lets say I have this code in UserInterface: . . .
Adam Grey wrote:I guess I need some help with what methods to call from SearchBooks in order to populate the JTable that is in the UserInterface class.