abstracttablemodel

Java, Sychronize JTable and ResultSet

Hello, I have JTable, And AbstarctDataModel with fill(ResultSet rs) methods. How to correct synchronize cursor of JTable with ResultSet's cursor? Any links? Thanx a lat. P.S. Please, add AbstractTableModel tag -- Canton of Uri's citizen ...

JTable Delete All Rows Exception

Hi, I'm trying to delete all entrys from my abstractTableModel. As long as I don't delete the last remaining row, everything works fine, but as soon as I delete this one, I get an ArrayOutOfBoundsException. I'm using a DefaultRowSorter and this seems to be the Exception. Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutO...

create TableModel and populate jTable dynamically

Hi all! I want to store the results of reading lucene index into jTable, so that I can make it sortable by different columns. From index I am reading terms with different measures of their frequencies. Table columns are these : [string term][int absFrequency][int docFrequency][double invFrequency] So i in AbstractTableModel I can defi...

Java Swing - Deleting rows from table with AbstractTableModel()

Hi, I have a table off AbstractTableModel. The data in the table is stored in a Vector. Now, when I remove a row, I am removing it successfully from the vector, but this is not getting updated in the view i.e. in the GUI. I read elsewhere that I need to use fireTableRowsDeleted(), and I am trying to call it inside a wrapper method in ...

How do I write an addElement method for a custom Model class extending AbstractTableModel?

For a hw assignment, I need to setup a JTable in Swing, and populate the table's contents via a custom model class that extends the AbstractTableModel. My questions regarding this overly complicated process are many fold, but I'll try and keep it simple. My first step is to get data into the model right? When I was using a JList (I coul...