How to move the caret to an absolute coordinate
Submitted by Thursday, 8 December, 2011 - 16:09
on
Given a coordinate (x, y) how can I set the caret to be at that position? I tried using JEditTextArea.xToScreenLineOffset to calculated the offset, however it givens strange answers.
In a file were I tried to move the caret to (1, 484) it givens an array index out of bounds error.
Definitely not the droids I'm looking for.
In a file were I tried to move the caret to (1, 484) it givens an array index out of bounds error.
Definitely not the droids I'm looking for.