Populating a JTable with the data from the MySQL database
Posted on 2009-02-15
could someone show me how to populate a JTable with the query results from the MySQL database. I'm having some problems with the TableModel and don't exactly know how to approach the problem. JTable requires a Object type of data and I don't know how to insert the query results inside. The database tables are: products, expiration, manufacturer, directions and fields that are to be into the JTable: products.name, products.manufacturer_id (points to manufacturer table), products.directions_id (points to directions table), expiration.date, expiration.supply.