private List<Box> listBox = new ArrayList<>();
listBox.add(readAll.exec);
The method readAll.exec
executes a thread. The result of the thread arrives about 20 second after the start of execution. Is there a way to syncronize the result of the thread in order to add to the listBox the result when it is ready?