I have a class View with a JTable and another class DB. In DB is a method with a database connection. When calling this method from
View
DB
The return type should be whatever you want your TableModel to support.
See Table From Database for some ideas.