the following example retrives data from table named "Customer"(without quotes) in database named "MYDATABASE" (without quotes) where "name","address" are the fields of the table.
Customer is a model class. (hope you know how to pass arguments with constructor)
This method returns an ArrayList of Customer.
Note : use DefaultTableModel instead for TableModel (trust me it's worthy).
when you want to add data simply insert them in to a Object.
in instance of DefaultTableModel contains method named addRow(); and pass that Object.
it will insert data in Object to the JTable.
Hope this was helpful.
Are you better than me? Then please show me my mistakes..