We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c959e8a commit e709a4eCopy full SHA for e709a4e
tmc-plugin/src/fi/helsinki/cs/tmc/ui/LoginDialog.java
@@ -12,7 +12,6 @@
12
import java.awt.event.WindowEvent;
13
import javax.swing.JOptionPane;
14
import javax.swing.SwingUtilities;
15
-import org.openide.util.Exceptions;
16
17
public class LoginDialog extends javax.swing.JDialog {
18
@@ -60,6 +59,17 @@ public void run() {
60
59
61
this.onLogin = onLogin;
62
this.visible = true;
+
63
+ /* Add a windowlistener to the dialog to track when the dialog is closed
64
+ * from the x-button
65
+ */
66
+ this.addWindowListener(new WindowAdapter() {
67
+ @Override
68
+ public void windowClosing(WindowEvent e) {
69
+ visible = false;
70
+ super.windowClosing(e);
71
+ }
72
+ });
73
}
74
75
public static boolean isWindowVisible() {
0 commit comments