@Override
        public String getAccessibleName() {
          try {
            Document document = MyEditorPane.this.getDocument();
            String result = document.getText(0, document.getLength());
            @NlsSafe String resultWithPunctuation =
              AccessibleContextUtil.replaceLineSeparatorsWithPunctuation(result);
            return resultWithPunctuation;
          }
          catch (BadLocationException e) {
            return super.getAccessibleName();
          }
        }
@Override
        public String getAccessibleName()