How can I get the position of the last character which is written in the JEditorPane?