I have a JFrame and this JFrame has a JButton.
I want in JButton first show JDialog (display "Please wait") and execute other code then closing JDialog.
But when showing JDialog stopped to execute other code on JButton.
Start the other processing on a Thread (e.g. in a SwingWorker) and at the start of it, call modalDialog.setVisible(true). At the end of the task call setVisible(false).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With