slider.getModel().addThumb(0,Color.black);
slider.getModel().addThumb(0.5f,Color.red);
slider.getModel().addThumb(1.0f,Color.white);
slider.setThumbRenderer(new GradientThumbRenderer());
slider.setTrackRenderer(new GradientTrackRenderer());
slider.addMultiThumbListener(new StopListener());
// called when the gradient property of the preview pane changes
gradientPreview.addPropertyChangeListener("gradient", new PropertyChangeListener() {