Before we get into the mechanics of writing beans, we want you to see how you might use or test them.
ImageViewerBean is a perfectly usable bean, but outside a builder environment it can’t show off its special features.
Each builder environment uses its own set of strategies to ease the programmer’s life. We cover one such environment: the NetBeans integrated development environment available from http://netbeans.org.
In this example, we use two beans,
FilePickerBean. You have already seen the code for
ImageViewerBean. We will analyze the code for
FilePickerBean later in this chapter. For now, all you have to know is that clicking the button with the “. . .” label opens a file chooser. ...