@Override
    public void actionPerformed (ActionEvent e) {
        JFileChooser chooser = new JFileChooser();
        String choosertitle = "Please select an install location";
        if (optionsPane != null) {
            chooser.setCurrentDirectory(new File(Settings.getSettings().getInstallPath()));
            chooser.setDialogTitle(choosertitle);
            chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            chooser.setAcceptAllFileFilterUsed(false);
            if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                Logger.logDebug("getCurrentDirectory(): " + chooser.getCurrentDirectory());
                Logger.logDebug("getSelectedFile() : " + chooser.getSelectedFile());
                optionsPane.setInstallFolderText(chooser.getSelectedFile().getPath());
            } else {
                Logger.logWarn("No Selection.");
            }
        } else if (editMPD != null) {
            if (!Settings.getSettings().getLastAddPath().isEmpty()) {
                chooser.setCurrentDirectory(new File(Settings.getSettings().getLastAddPath()));
            }
            chooser.setDialogTitle("Please select the mod to install");
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            chooser.setAcceptAllFileFilterUsed(true);
            if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                File destination = new File(editMPD.folder, chooser.getSelectedFile().getName());
                if (!destination.exists()) {
                    try {
                        FTBFileUtils.copyFile(chooser.getSelectedFile(), destination);
                        Settings.getSettings().setLastAddPath(chooser.getSelectedFile().getPath());
                        LaunchFrame.getInstance().saveSettings();
                    } catch (IOException e1) {
                        Logger.logError(e1.getMessage());
                    }
                    editMPD.updateLists();
                } else {
                    ErrorUtils.tossError("File already exists, cannot add mod!");
                }
            } else {
                Logger.logWarn("No Selection.");
            }
        } else {
            chooser.setCurrentDirectory(new File(Settings.getSettings().getInstallPath()));
            chooser.setDialogTitle(choosertitle);
            chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            chooser.setAcceptAllFileFilterUsed(false);
            if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                Logger.logDebug("getCurrentDirectory(): " + chooser.getCurrentDirectory());
                Logger.logDebug("getSelectedFile() : " + chooser.getSelectedFile());
                firstRunDialog.setInstallFolderText(chooser.getSelectedFile().getPath());
            } else {
                Logger.logWarn("No Selection.");
            }
        }
    }