Hello.
I've made the reservation system as follows:
I have a class that asks for the number of seats to reserve. After returning from this class, a
thread is created. This thread makes the reservation. After the thread.start() I have a call to a method that refreshes the data to be show in the JTable.
My problem is, when I book a seat, the refresh data method is executed before the thread
The code is as follows:
I've tried with the .isAlive() method from the thread, but this just hangs the program, as the thread is allways alive, even after it has finished the execution!
What is the best way to solve this?
Thanks,
Miguel