I have a text area, whenever the scroll bar is scrolled, I want to call a method. On what event I should call the method? I tried:
private void jScrollPane1MouseReleased(java.awt.event.MouseEvent evt) {
//execute();
System.out.println("Scroller Moved");
}
You want to use the
AdjustmentListeneron the JScrollBar (choose the one you want to listen for movement on). Here’s an example of listening on the vertical bar.