private void findFile(byte dirTxt){
        JFileChooser fc = new JFileChooser();
        
        fc.setApproveButtonText("Set");
        
        Game g = GameFactory.getGameFromID(games[selectedTab]);
        String path;
        
        if(dirTxt == EXE_DIR){
            fc.setFileFilter(new ExeFileFilter());
            fc.setAcceptAllFileFilterUsed(false);
            fc.setDialogTitle("Select the " +  g.getName() + " launch executable");
            
            path = prefs.get(g.getExeConfigKey());
            if(path == null)
                path = g.getExe();
        } else if(dirTxt == DATA_DIR){
            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            fc.setDialogTitle("Select the " + g.getName() + " game data folder");
            
            path = prefs.get(g.getDirConfigKey());
            if(path == null)
                path = g.getDir();
        } else {
            // Create a new 7-zip executable filter
            fc.setFileFilter(new GenericFileFilter(
                    new String[] {"7z.exe","7za.exe"},
                    "7z.exe"));
            
            fc.setDialogTitle("Select the 7zip Executable");
            
            path = prefs.get(Config.Key.seven_zip_exe.toString());
            if(path == null)
                path = Config.get(Config.Key.seven_zip_exe);
        }
        fc.setCurrentDirectory(new File(path));
        
        int result = fc.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION)
        {
            path = fc.getSelectedFile().getAbsolutePath();
            
            if(dirTxt == EXE_DIR){
                exeFileTxt.setText(path);
            } else if(dirTxt == DATA_DIR){
                path += java.io.File.separator;
                dataDirTxt.setText(path);
            } else {
                sevenZipExeTxt.setText(path);
            }
        }
    }