Listing 9. Draw the butterfly and repaint. |
---|
//Set the opacity of butterfly and copy it onto // the display. Then repaint the display. butterfly = setOpacity(butterfly,slider.getValue()); drawPictureOnPicture( butterfly, display, backgroundWidth/2 - butterflyWidth/2, backgroundHeight/2 - butterflyHeight/2); display.repaint(); }//end stateChanged }//end new ChangeListener );//end addChangeListener //--------------------------------------------------// }//end constructor |