Example #1
0
 public void setCaretPosition(int position) {
   Caret c = textView.getCaret();
   // move the caret
   c.setDot(position);
 }
Example #2
0
 public int getCaretPosition() {
   Caret c = textView.getCaret();
   return c.getDot();
 }