docTextPane.setCursor(def);
		public void run() {		    try {			setCursor(wait);			docTextFrame.setCursor(wait);			docTextPane.setCursor(wait);			// get the doc text			TableModel m = answerAll.getModel();			//    String name = (String) m.getValueAt(row, 0);			String name = names[row];			status.setText("Getting " + name);			String title = (String) m.getValueAt(row, 1);			if (title.equals(""))			    docTextFrame.setTitle(name);			else			    docTextFrame.setTitle(title);			currentDocId = docids[row]; // internal docid			// get the parsed document			int [] ids = new int[1];			ids[0] = currentDocId;			// check for an interrupt			if (Thread.interrupted()) {			    throw new InterruptedException();			}			ParsedDocument[] docs = env.documents(ids);						// check for an interrupt			if (Thread.interrupted()) {			    throw new InterruptedException();			}			currentParsedDoc = docs[0];			String myDocText = currentParsedDoc.text;			// if it was a windows formatted file (^M^J for EOL),			// we have to account for the ^M characters, that get			// ignored by StyledDocument when inserting highlighting.			// Nasty hack.			// broken for some powerpoint docs?			StringBuffer buf = new StringBuffer();			buf.ensureCapacity(myDocText.length());			// can't get it to match on the char.			// ugh, damn windows.			for (int i = 0; i < myDocText.length(); i++) {			    char c = myDocText.charAt(i);			    // windows smart quote is 3 char wide in a 			    // StyledDocument.			    if (c == 8220)				buf.append(" ''");			    else if (c == 8221)				buf.append("'' ");			    else if (c == '\r')				buf.append(' ');			    else 				buf.append(c);			// check for an interrupt every 100 char			if ((i%100) == 0 && Thread.interrupted()) {			    throw new InterruptedException();			}			}			myDocText = buf.toString();			// insert into doc text pane			docTextPane.setContentType("text/plain");			docTextPane.setText(myDocText);			// reset caret to start of doc text.			docTextPane.setCaretPosition(0);			// get it visible			if (! docTextFrame.isShowing()) {			    docTextFrame.setLocationRelativeTo(query);			    docTextFrame.setVisible(true);			}			// check for an interrupt			if (Thread.interrupted()) {			    throw new InterruptedException();			}			// insert the matches markup			DefaultTreeModel tree = (DefaultTreeModel) docQueryTree.getModel();			DefaultMutableTreeNode root = (DefaultMutableTreeNode) tree.getRoot();			// this is painfully slow			highlight(root);			status.setText(" ");		    } catch (InterruptedException ex) {			// jump to exit			status.setText(" ");		    } catch (OutOfMemoryError er) {			status.setText("Out of Memory. Unable to open document");		    }		    setCursor(def);		    docTextFrame.setCursor(def);		    getDocTextThread = null;		}