I'm trying to load 10000 records from a table in my SQL database into a JTable. I get memory problems because the table model is based on Vectors. How can I implement a table model that is not based on Vectors?

Andreas Schaefer

Create a subclass of either the interface "TableModel" or the class "AbstractTableModel". The second is easier to use because it contains already the event fireing when you add, change or remove rows/columns.

Then in your subclass of AbstractTableModel you have to overwrite:

getValueAt( int pRow, int pColumn )
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.