CharSequence () { try { final Document document = myTextComponent.getDocument(); return document.getText(0, document.getLength()); } catch (BadLocationException e) { throw new RuntimeException(e); } }