access specific positions in JTextArea
Posted on 2001-06-14
Is there a way to position cursor at (or highlight) a specific line in a JTextArea (e.g., a line that contains certain string)? If so, how?
For example, I have a textArea embeded in a scrollPane. There is a 'find' button with a string entry. User can enter and search for a specific string in the textArea. When the string is found, the textArea should scroll automatically to show the found string.