I am writing an application that requires the user to enter some data into the Swing GUI, which the application will then use. After the user enters data, a graphical interface is no longer required, since the application will write some data to files.
The general idea is this:
launchGui(); closeGui(); continueWithComputation();
I understand that Swing uses several threads in the background, which I understand, so the program does not block until the GUI closes.
Is it possible to somehow expect the completion of the GUI (a single JFrame
closed with dispose()
) before continuing with continueWithComputation()
?
source share