]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
Make opening dialogs re-gain focus when user switch back to main UI from other window...
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / toolchain / Preferences.java
index 17e5afe7ddf28ad75f9dd46d06d4ecb249fa070a..0c23b6a854bfd2a80ef331376614886141eb3e79 100644 (file)
@@ -30,7 +30,6 @@ import java.util.Scanner;
 import javax.swing.*;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTextField;\r
-import javax.swing.JFrame;\r
 \r
 import org.tianocore.frameworkwizard.common.GlobalData;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
@@ -98,8 +97,6 @@ public class Preferences extends IFrame {
 \r
     private WorkspaceTools wt = new WorkspaceTools();\r
 \r
-    private JFrame frame;\r
-\r
     private final int activePlatformId = 0;\r
 \r
     private final int buildTargetId = 1;\r
@@ -467,13 +464,13 @@ public class Preferences extends IFrame {
 \r
                     chooser.setMultiSelectionEnabled(false);\r
                     chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r
-                    int retval = chooser.showOpenDialog(frame);\r
+                    int retval = chooser.showOpenDialog(Preferences.this);\r
                     if (retval == JFileChooser.APPROVE_OPTION) {\r
 \r
                         theFile = chooser.getSelectedFile();\r
                         String file = theFile.getPath();\r
                         if (!file.startsWith(dirPrefix)) {\r
-                            JOptionPane.showMessageDialog(frame, "You can only select files in the Tools"\r
+                            JOptionPane.showMessageDialog(Preferences.this, "You can only select files in the Tools"\r
                                                                  + System.getProperty("file.separator")\r
                                                                  + "Conf directory!");\r
 \r