0
I am working with Java Swing. I have a report screen, which when it is clicked on the confirm button, it calls the generate method. The generating method goes in control, and the control goes in the window to fetch from the database the data to fill in the report... So far everything ok...
But the task I’m working on is to stop the whole process. Ex: When you click to generate the report, a wait screen appears. Let’s consider that it is taking too long the bank selects, and the user wants to cancel, and use the application again (without having to finish the system). That is, it will click the cancel button of the stand-by screen, and it will finish all processes
What solution can I use?
I use Ibernate, I need to make my system understand that WHERE AND WHAT IT’S DOING, after it clicks cancel, it has to stop EVERYTHING. And release my application for use
I assume you are using a new thread to generate the report, in this case, stop the thread. If necessary, you can put a timeout. More details on how to stop a thread, you can see here: https://answall.com/questions/45320/como-parar-uma-thread
– Filipe L. Constante
@Filipel.Constante Filipe, I put below an example of how is my code.. I am not using threads..
– MATHEUS SOUZA
Edit your question and ask the question the code nicely.
– Filipe L. Constante
I suggest you use a thread to/ generate the report, otherwise your application will be on hold until the report is completed.
– Filipe L. Constante