System.out.println("Michael: JTextComponent.replaceSelection: Error");
  public synchronized void replaceSelection(String content)  {    int dot = caret.getDot();    int mark = caret.getMark();    // If content is empty delete selection.    if (content == null)      {	caret.setDot(dot);	return;      }    try      {	int start = getSelectionStart();	int end = getSelectionEnd();		// Remove selected text.	if (dot != mark)	  doc.remove(start, end - start);	// Insert new text.	doc.insertString(start, content, null);	// Set dot to new position.	setCaretPosition(start + content.length());      }    catch (BadLocationException e)      {	// This should never happen.	System.out.println("Michael: JTextComponent.replaceSelection: Error");      }  }