I am using the jsoup to get data from different URLs. I am trying to add them to my JTable. However it is only added after the entire thread completes, i.e. only after going through every URL, data is updated in JTable.
Here is what I do to update my JTable:
String rowData2[] = {title, city};
model.addRow(rowData2);
How can I make java to wait for updating this before moving on to next iteration of my loop for scraping data?