Behavior of the program:
Generally speaking, this program
- Instantiates a new visual object that extends the JFrame class
and contains a JSlider object.
- Instantiates Picture objects from two image files (beach and
butterfly) along with some blank Picture objects of the same
size.
- Defines a method named setOpacity that can be called to set the
opacity of every pixel in a picture to a specified value.
- Defines a method named drawPictureOnPicture that can be called to
draw one picture onto another picture.
- Registers a ChangeEvent handler on the slider to:
- Extract a percent-opacity value from the slider based on the
position of the thumb.
- Apply that opacity value to the butterfly image.
- Draw the modified butterfly image on the beach image and display it.