I have this problem when i create a sortable JTable with data load from an ArrayList!

My project is Student Management and i add some function like Add/Edit/Delete infomation.
With unsortable JTable, add/edit/delete function is ok, but with sortable JTable, when i click on the header of one column, that column's sorted ASC or DESC like MS EXCEL and smth like that... the edit/delete function (by select row i want to edit/delete) doesnt work correctly: i click one row display info of a person and click edit, a form will be displayed and filled with info of that person, but the problem here is when click on the header, the table is sorted but, when click edit, it display info of other person!

Someone can help me?

Without code difficult to help