I think this is the Easiest way to populate/model a table with ResultSet.. Download and include rs2xml.jar Get rs2xml.jar in your libraries..
import net.proteanit.sql.DbUtils;
try
{
CreateConnection();
PreparedStatement st =conn.prepareStatement("Select * from ABC;");
ResultSet rs = st.executeQuery();
tblToBeFilled.setModel(DbUtils.resultSetToTableModel(rs));
conn.close();
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex.toString());
}