I'm new to JTable. I have two buttons "add Row", "Del Row" and I have some records displayed from db which contains an auto increment column. when ever "add row" is clicked a new record will be added to JTable with a auto increment column number displayed in sequential order.
My requirement is when ever a specific row in between is removed by clicking "del row" button. then the succeeding records auto increment column should be updated with removed column id and the sequence should be updated for the remaining columns. The same has to be updated in the database too.
when I delete the row from jTable the associated record in db is also deleted but in the front end in jTable I'm unable to update the "auto increment column".
Ex: 1,2,3,4... are the incremental column id. when i delete 3rd row then it is displaying as 1,2,4.... in jtable. But my requirement is the rows after the deleted row id should be incremented in sequence with the row id of the previous row of the deleted row which should be 1,2,3.....