public void actionPerformed(ActionEvent e) {
			String xmlName, path;
			InputFormatValidator v = new InputFormatValidator();
			xmlName = translate.getFilename();
			path = translate.getPath();

			if (xmlName.isEmpty() || path.isEmpty()) {
				translate
						.setErrorMsg("Please enter the XML file name and choose a directory");
			} else {
				if (v.validateFilename(xmlName)) {
					try {
						String fName = "";
						// for mac
						String OS = System.getProperty("os.name").toLowerCase();
						if (OS.indexOf("mac") >= 0) {
							fName = path + "/" + xmlName;
						} else {
							// for windows
							fName = path + "\\" + xmlName;
						}
						r.translateToXML(dbname, fName, nary);
						translate.displaySuccessfulMsg();
						translate.emptiedField();
						translate.setErrorMsg(" ");
						// open the files generated
						try {
							Desktop.getDesktop().open(new File(fName + ".xml"));
							Desktop.getDesktop().open(new File(fName + ".xsd"));
						} catch (Exception ex) {
							ex.printStackTrace();
						}
						main.showMainPane();
					} catch (MainException me) {
						translate.setErrorMsg(me.getMessage());
						me.printStackTrace();
					}
				} else {
					translate.setErrorMsg("Invalid file name");
				}
			}
		}