Code
JScrollPane scroll = new JScrollPane(c);
scroll.getVerticalScrollBar().getModel().addChangeListener(e -> {
BoundedRangeModel m = (BoundedRangeModel) e.getSource();
int extent = m.getExtent();
int maximum = m.getMaximum();
int value = m.getValue();
if (value + extent >= maximum) {
check.setEnabled(true);
}
});
No comments:
Post a Comment