Register a ChangeListener on the slider (cont'd)
Then the
stateChanged method in Listing 5
- calls the rotatePicture method
- to draw a rotated version of the butterfly
- on top of the background image
- using the slider value, (which ranges from 0 to +360),
- as the rotation angle in degrees.