Problem when adding values of the ResultSet to a AbstractTableModel
The reason of this post if I do not know how to put the values of the resultset (a query of SQL Server 2005) in an AbstractTableModel extended class.
I used to make object and String in order to fill them with the data of the ResultSet and then add them to the JTable, but that was when I declared the JTable as: JTable tab = new JTable(obj,strg); I heard that there is an easier way to do that, just by sending the ResultSet from my actual class, for example, catalogue, as a parameter to the model class. I did that and also made some of the procedures that it asked for, for example: getColumnCount()... but when I execute my project it just doesn't works, well, all works but the table doesn't appear.
As an extra information, what I do in my catalogue class is:
catModelo = new Modelo(rs);
JTable tablas = new JTable(catModelo);
So it calls the model: Modelo, and it suppossed to work, but do not, what I'm doing wrong?
Thanks since now for any help!