Hi,
I've got a little app with a JTextArea inside of a JScrollPane that
displays rows of results. When the user searches for something one of
the options is to hilite the entire row that contains the search text.
The problem with this is if the data in the row goes past the
viewable textarea, the scrollpane automatically scrolls to the end of
the hilited row. After hiliting the text, if I set the caret position
back to where I want it the hiliting is obviously lost.
So, is there a way I can 1) get the horizontal scrollbar to not scroll
when the row of text is selected, or 2) get the horizontal scrollbar
to just scroll to the beginning of the row without losing the
hiliting?
I am relatively new to java gui so there may be an easier way to do
this. Thanks.
Andrew Thompson - 07 May 2004 14:54 GMT
> After hiliting the text, if I set the caret position
> back to where I want it the hiliting is obviously lost.
Select it backwards?

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology