In general, you want to let ImageButton automatically determine the image that should be displayed when the button is pressed, using a grayed-out version of the normal image. However, you can supply it explicitly using this method. Handling ImageButton Events You handle events exactly the same way as with regular buttons in Java 1.0. Listing 13.14 presents the source code for the ImageButton . ImageButton.java import java.awt.
Light grays look best.
The URL of the image. Create an ImageButton using the image specified. The action is not triggered until mouseUp. Otherwise ignore this. The darkness value to use for grayed images.