public JTextComponent getReplacementArea() {
    if(replacementArea == null) {
      replacementArea = new JTextArea();
      replacementArea.setLineWrap(true);
      replacementArea.setFont(textAreaFont);
      replacementArea.setEditable(false);
      replacementArea.setBackground(Color.LIGHT_GRAY);
      
      // Updates to the input area change both the matching area's text and highlighting.
      DocumentListener docListener = new DocumentChangeAdapter() {
        public void anyUpdate(DocumentEvent e) {
          replacementArea.setText(getInputArea().getText());
          String replaceWithText = getReplaceWithField().getText();
          if(!"".equals(replaceWithText)) {
            applyReplacementHighlighting(replacementArea, getRegexArea().getPattern(), replaceWithText);
          }
        }
      };
      getInputArea().getDocument().addDocumentListener(docListener);
      getReplaceWithField().getDocument().addDocumentListener(docListener);
      
      // Updates to the regex area change the matching area's highlighting.
      RegexListener regexListener = new RegexListener() {
        
        public void regexUpdate(RegexEvent e) {
          replacementArea.setText(getInputArea().getText());
          String replaceWithText = getReplaceWithField().getText();
          if(!"".equals(replaceWithText)) {
            applyReplacementHighlighting(replacementArea, getRegexArea().getPattern(), replaceWithText);
          }
        }
        
      };
      getRegexArea().addRegexListener(regexListener);
    }
    return replacementArea;
  }