public void saveText(int textResultType){
		JFileChooser saveText = new JFileChooser(lastOpenDir); 
		int saveStatus = saveText.showSaveDialog(ContentMain.instance);
		if(saveStatus==JFileChooser.APPROVE_OPTION){
			File selectedFile = saveText.getSelectedFile();
			if(selectedFile.exists()){
				if(confirmOverride()){
					String path = selectedFile.getAbsolutePath();
					
					if(!path.toLowerCase().endsWith(".txt")){
						selectedFile = new File(path+".txt");
					}
//					System.out.println(selectedFile.getAbsolutePath());
					if(textResultType==SAVE_FROM_CURRENT)
						Save.saveToText(selectedFile, textResult.getText());
					else if(textResultType==SAVE_FROM_HISTORY)
						Save.saveToText(selectedFile, history.getText());
				}
			}else{
				String path = selectedFile.getAbsolutePath();
				
				if(!path.toLowerCase().endsWith(".txt")){
					selectedFile = new File(path+".txt");
				}
//				System.out.println(selectedFile.getAbsolutePath());
				if(textResultType==SAVE_FROM_CURRENT)
					Save.saveToText(selectedFile, textResult.getText());
				else if(textResultType==SAVE_FROM_HISTORY)
					Save.saveToText(selectedFile, history.getText());
			}
//			System.out.println(selectedFile.getParent());
			lastOpenDir=selectedFile.getParent();
		}
	}