public void forward ()

Moves the caret position forward. If there is no selection, then the caret position is moved one character forward. If there is a selection, then the caret position is moved to the end of the selection and the selection cleared.