阅读背景:

Swing:滚动到JScrollPane的底部,以当前视口位置为条件

来源:互联网 

I am attempting to mimic the functionality of Adium and most other chat clients I've seen, wherein the scrollbars advance to the bottom when new messages come in, but only if you're already there. In other words, if you've scrolled a few lines up and are reading, when a new message comes in it won't jump your position to the bottom of the screen; that would be annoying. But if you're scrolled to the bottom, the program rightly assumes that you want to see the most recent messages at all times, and so auto-scrolls accordingly.I am attempting to mimic the functionality of A




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: