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:

getRowCount()
getColumnCount()
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