code: private String getDocumentText()
      {
          try
          {
              Document document = textComponent.getDocument();
              String text = document.getText(0, document.getLength());
              return text;
          }
          catch (BadLocationException e)
          {
              logger.warning(e.toString());
              return textComponent.getText();
          }
      }
docs: Return the text of the document of the text component
  
  @return The text