public void highlight(String pattern) {
		/* First remove all old highlights */
		removeHighlights();
		try {
			Highlighter hilite = getHighlighter();
			Document doc = getDocument();
			String text = doc.getText(0, doc.getLength());
			int pos = 0;
			while ((pos = text.indexOf(pattern, pos)) >= 0) {
				hilite.addHighlight(pos, pos + pattern.length(), myHighlightPainter);
				pos += pattern.length();
			}
		} catch (BadLocationException e) {
			e.printStackTrace();
		}
	}