Don't call updateUI()
as this should only be called when L&F is changed. Your delete row method is part of your model right? Are you firing the model's fireXXX()
notification methods after deleting? You should be. Also, I wonder if you should be using an iterator to do your deleting.
Edit
You state:
No delet method is part of my controller (is it wrong?).
Wrong. The method should be part of your table model, and controller can call this method on the model, but shouldn't have this method. The table model should extend AbstractTableModel and should call the proper fireXXX method when data is removed, added, or changed. For delete, call fireTableRowsDeleted method, and definitely check the AbstractTableModel API for the details on all such available notification methods.
I removed 'updateUI()' line ,its ok until i click on a cell of table ,when i do this he exeption thrwon . means that actually 'firexxx()' cuase it ,right?
No. I have no idea what your code is doing or the cause of your exceptions right now. Consider creating and posting an sscce.
Oh youre right . but Why when i call 'table.getModel()' i dont see fireXXX()'but by with a refernce to model instance it will be seen. 'mymodel.fireTableDataChanged()'
Outside classes should not call the fire methods. The model itself should be the only object calling its own notification methods.
If you haven't gone through the JTable tutorial, I suggest that you consider doing this without delay. It will help you a great deal.