When executing this code, the data in the table changes only after the end of the k-cycle, i.e. instead of 0,1,2,3,4 in the corresponding cells (5th column) I get this data three times, but after that ends while.
The code is for example
int k = 0; while(k < 3){ /.... Do something .../ for(int i=0; i < 5;i++) { model.setValueAt(i, i, 4); model.fireTableCellUpdated(i, 4); //table.updateUI(); } k++; } Actually, I need to infinitely display the changing data on the screen in tabular form after each iteration with the exit from the loop on the button.
Faced with the fact that the data is updated only after the end of the cycle.
Tried table.updateUI() , model.fireTableCellUpdated() , to pause Thread - does not work.