Well I don't exactly have the code, but it's not necessary for me to provide any at this moment.
The problem is I have a JScrollPane, and we all known it has a scrollbar if there is too much text to fit in the box. When I have too many lines, instead of following the new text being entered it just stays still, and only old text is visible. To see the newly added lines, the user has to click on the bar and scroll down. This gets tedious, is there any way to have it always display new text instead of just making the user go down to see new text? Thanks. :ar!
This doesn't seem to be the behavior of a JScrollPane on my system (unix,mac). Because its not apparent exactly what you are doing, perhaps posting code that will reproduce the occurrence will help to diagnose the problem. Worse comes to worse, you can add a DocumentListener and call something like scrollRectToVisibe(Rect r) to scroll