Draw the butterfly
The stateChanged method in Listing 9
- calls the setOpacity and drawPictureOnPicture
methods to
- set the opacity of the butterfly
- to the value currently represented
- by
the position of the thumb on the slider.
- (This is the value returned by
the slider's getValue method.)
- Draw the butterfly image on the background image.