I'm not sure I understand what you are looking at.
JTextArea will already move the caret to where you click, so long as there is text there. If you want to place a cursor up to that point, it could probably be done by attaching a listener to the caret or a mouse listener, and padding the space up to it with spaces. I don't think the component will allow me to force render a caret in the middle of a document without content. Could be wrong though since I've never tried that.
header('HTTP/1.1 420 Enhance Your Calm');