O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.3. Using Beans to Build an Application

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, ImageViewerBean and 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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required