Hi,
I am new to
JAVA and NetBeans. My problem is basically to dynamically update the contents of Jtable when an event (such as a button click occurs). I am using the following function to do the same in event handling function:
jTable1.setValueAt(celval, jTable1.getEditingRow(), jTable1.getEditingColumn());
I have verified the values returned by celval( A
String) , getEditingRow (gives the row number of the selected cell.) , getEditingColumn(gives the column number of the selected cell).
But the problem is that setValueAt neither updates the cell value( I tried verifying by using getValueAt function) nor does it update the values being displayed in the GUI. Can anyone tell me how to correctly use this function.
The JTable is used here is has DefaultTableModel as its Model. ( Honestly, I dont know much about that, I just used NetBeans drag and drop. )
Am pasting the code as generated by NetBeans for this JTable.
Any help would be greatly appreciated.
Thanks!