且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

仅当附加文本时,JTextArea才会滚动到底部

更新时间:2023-01-14 11:32:25

签出智能滚动。

如果滚动条位于底部,则随附文本,您将看到新文本。

If the scrollbar is at the bottom, then as text is appended you will see the new text.

如果用户滚动到其他位置,则视口将保持不变,直到用户滚动到底部。

If the user has scrolled to a different position, then the viewport will stay there until the user scrolls back to the bottom.