This is your fourth question about displaying an image in JTable, so I assume you already know how to do this.
So, if you want to update the row when the selection changes, you will need to use a ListSelectionListener. Then, when the listener starts, you will need to update the TableModel to remove the icon from the previous line and update the icon in the current line.
JList: The previous item selected shows that you can get line numbers for the update.
source share