Hallo,
But I don't use a AbstractTableModel. I use the following code for
creating the JTable and the DefaultTableModel:
static JTable tblSearchResults;
private DefaultTableModel model;
model = new DefaultTableModel(new Object[]{"TextName", "Thesaurus"},0);
tblSearchResults = new JTable(model);
tblSearchResults.setAutoscrolls(true);
tblSearchResults.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//tblSearchResults.setColumnSelectionAllowed(true);
tblSearchResults.setRowSelectionAllowed(true);
TableColumn col = tblSearchResults.getColumnModel().getColumn(0);
int width = 100;
col.setPreferredWidth(width);
TableColumn col1 = tblSearchResults.getColumnModel().getColumn(1);
int width1 = 607;
col1.setPreferredWidth(width1);
JScrollPane scrollPane = new JScrollPane(tblSearchResults);
scrollPane = tblSearchResults.createScrollPaneForTable(
tblSearchResults );
tblSearchResults.setBounds(13,48,707,264);
tblSearchResults.setVisible(true);
scrollPane.setBounds(13,48,707,264);
scrollPane.setVisible(true);
this.getContentPane().add(scrollPane);
The data with which the JTable is filled comes from a Database.
Can anybody help me how I can realize the update in that case?
thx