I have a selected row statement but it always return the first row. I have a statement fireTableDataChanged() when I delete or add a row and I don't now cause is that or not.
My code here
Selected row statement:
public void mouseClicked(MouseEvent e)
{
selectedrow = table.getSelectedRow();
}
When I delete or insert one row, I run this statement:
model.fireTableDataChanged();
The first time I try it returns correctly row, but any times later, it wrongs, it always return the first row, it mean index = 0, I try print it and I confirm that true, always 0.
Please help me.
What I have tried:
Please help me fix it. I spend very much my time but nothing happen