Hi all ,

I'm trying to do find and highlight program which finds a given word by highlighting it in the textarea.
I'm finding the word in a textarea which has both vertical and horizontal scrollbars .if the word is with in the visible area everything is fine but if that word is not in the visible region (say above or left to the visible region) the scroll bars is not automatically updated .

If that word is available to right or down to the visible region means the scroll bars automatically moves.

What might be the problem ? How to resolve this problem ?

Thanks in advance

setCaretPosition

Read the API docs.