I have a Java swing application which loads a web page. Sometimes, the web page takes a while to load depending on the user's internet connection.
I want to block this frame until page has loaded.
The simplest option is to pop up a modal dialog:
JDialog modalDialog = new JDialog(frame, "Busy", ModalityType.DOCUMENT_MODAL);
modalDialog.setSize(200, 150);
modalDialog.setLocationRelativeTo(frame);
modalDialog.setVisible(true);
You may want to put a progress bar in it.
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