title: How to read last word or last line in DocumenListener
body: <p>I implement DocumentListener for JEditorPane ( need help with method insertUpdate(DocumentEvent e) ). How to read last word or last line (lines are separated by '\n' and words are separated by ' ' ) ? </p>