From f54e4d9b83be19fa0b07166ddd57cb4f6076dd87 Mon Sep 17 00:00:00 2001 From: Vhati Date: Thu, 22 Aug 2013 05:24:14 -0400 Subject: [PATCH] Properly set parentComponent for dat-finding prompts --- src/main/java/net/vhati/modmanager/core/FTLUtilities.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/vhati/modmanager/core/FTLUtilities.java b/src/main/java/net/vhati/modmanager/core/FTLUtilities.java index 05ab0bc..149f4ce 100644 --- a/src/main/java/net/vhati/modmanager/core/FTLUtilities.java +++ b/src/main/java/net/vhati/modmanager/core/FTLUtilities.java @@ -61,7 +61,7 @@ public class FTLUtilities { /** * Modally prompts the user for the FTL resources dir. * - * @param parentComponent a parent for Swing popups, or null + * @param parentComponent a parent for Swing dialogs, or null */ public static File promptForDatsDir( Component parentComponent ) { File result = null; @@ -70,7 +70,7 @@ public class FTLUtilities { message += "You will now be prompted to locate FTL manually.\n"; message += "Select '(FTL dir)/resources/data.dat'.\n"; message += "Or 'FTL.app', if you're on OSX."; - JOptionPane.showMessageDialog(null, message, "Find FTL", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog( parentComponent, message, "Find FTL", JOptionPane.INFORMATION_MESSAGE ); final JFileChooser fc = new JFileChooser(); fc.setDialogTitle( "Find data.dat or FTL.app" ); @@ -86,7 +86,7 @@ public class FTLUtilities { }); fc.setMultiSelectionEnabled(false); - if ( fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ) { + if ( fc.showOpenDialog( parentComponent ) == JFileChooser.APPROVE_OPTION ) { File f = fc.getSelectedFile(); if ( f.getName().equals("data.dat") ) { result = f.getParentFile();