@Override
	public void actionPerformed(ActionEvent e) {
		JFileChooser chooser = new JFileChooser();
		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.logInfo("getCurrentDirectory(): " + chooser.getCurrentDirectory());
				Logger.logInfo("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 {
						FileUtils.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.logInfo("getCurrentDirectory(): " + chooser.getCurrentDirectory());
				Logger.logInfo("getSelectedFile() : " + chooser.getSelectedFile());
				installDialog.setInstallFolderText(chooser.getSelectedFile().getPath());
			} else {
				Logger.logWarn("No Selection.");
			}
		}
	}