protected JScrollPane getScrollPane() {
// Get scrollpane, if first time calling this method then add an addjustment listener
// to the scroll pane
if(this.getParent() instanceof JViewport) {
if(scrollPane == null) {
JViewport p = (JViewport)this.getParent();
scrollPane = (JScrollPane)p.getParent();
scrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener(){
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
//need to repaint the triangle when scroll bar moves
repaint();
}
});
}
}
return scrollPane;
}
SimpleTextPaneResizeable.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:wandora
作者:
评论列表
文章目录