String waitingText) {
super(parent);
+ this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+
this.pg = pg;
if (waitingText != null) {
/**
* Notify this {@link WaitingDialog} that the job is done, and dismiss it if
* it was already showing on screen (or never show it if it was not).
+ * <p>
+ * Will also dispose the {@link WaitingDialog}.
*/
public void dismiss() {
synchronized (waitLock) {
if (waitScreen) {
setVisible(false);
+ dispose();
}
waitScreen = true;
}