Writing Advanced Beans
Advanced Bean programming is about customization. Beans can be customized in
two senses. In both cases, you provide a basic behavior for a Bean and allow
its specific behavior to be controlled by end users who interact with the Bean,
typically through application builder tools. A Bean can be customized for a
specific application either programmatically, through Java code, or visually,
through GUI interfaces hosted by application builder tools. In the latter case,
you can provide customized dialog boxes and editing tools with sophisticated
controls. Such customization tools would be packaged as part of the Bean.
The Bean thus becomes a set of classes, including the Bean proper, as well as
other classes that provide a clean, simple, and intuitive interface through
which end users can specify precise Bean behavior in applications. Once you've
worked through the examples in this segment, you'll have a solid understanding
of Beans and will be well on your way to building reusable software components
that others will want to use in their programs.
In this concluding segment to the JavaBeans Tutorial, you'll write more
advanced Beans. You'll see how to convert old applets and JDKTM 1.0
programs to Beans. You'll learn about the AWT delegation event model; how
Beans can notify other objects about change events; and see how reflection
and introspection let you customize the behavior and presentation of your
Beans.
Table of Contents
Greg Voss is a JavaSoft engineer and OOP specialist. He develops training
materials to assist JavaSoft licensees in porting the Java1 Virtual Machine to
new platforms and devices. As a founding team member of the Java Developer
Connection, he has contributed articles on JavaBeans, Java Server, and Java
language parsing tools.
_______
1 As used on this web site,
the terms "Java virtual
machine" or "JVM" mean a virtual machine
for the Java platform.