Java tutorial
import javax.swing.DefaultBoundedRangeModel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class Main { public static void main(String args[]) { DefaultBoundedRangeModel model = new DefaultBoundedRangeModel(1, 2, 3, 4); } } class MyChangeListener implements ChangeListener { public void stateChanged(ChangeEvent e) { System.out.println("A ChangeEvent has been fired!"); } }