slider.addChangeListener(
new ChangeListener(){
public void stateChanged(ChangeEvent e){
//Restore the background image of the display
// to all white.
graphics = display.getGraphics();
graphics.drawImage(
background.getImage(),0,0,null);
//Rotate the butterfly image, draw it on the
// display, and repaint the display on the
// screen..
rotatePicture(slider.getValue());
display.repaint();
}//end stateChanged
}//end new ChangeListener
);//end addChangeListener
//--------------------------------------------------//
}//end constructor
|