How the Book Is Organized

The chapters in this book are organized so that each one builds upon the information presented in previous chapters, so it’s best if you read the chapters in order.

Chapter 1

This chapter provides a general description of the component model, followed by an overview of the JavaBeans architecture.

Chapter 2

This chapter describes the event model introduced in Java 1.1. It covers event listener interfaces, event objects, and event sources, and covers the semantics of event delivery. Topics also include design patterns, event listener registration, and multicast and unicast events.

Chapter 3

This chapter describes how to use event adapters to simplify an event listener, and how to adapt an object to an event listener interface. Topics include demultiplexing, using low-level reflection to create generic adapters, event filtering, and event queuing.

Chapter 4

This chapter describes properties, the named attributes that define the state and behavior of a component. Properties represent some part of the Bean that is likely to be manipulated by nontraditional programming techniques such as visual editors. Topics include design patterns, accessor methods, indexed properties, bound and constrained properties, and property-related events.

Chapter 5

This chapter describes the use of object serialization provided by Java 1.1 for saving and restoring the state of a Bean. It discusses what can and can’t be stored and how storage and retrieval is accomplished. Topics include automatic and class-specific serialization, serializing an object’s class hierarchy, class versioning and compatibility, and serialized versions of Beans.

Chapter 6

This chapter describes the Java Archive (JAR) file, used to package one or more Beans, classes, or associated resource files. The jar utility provided with the JDK is discussed, along with manifest entries, and how to use them to identify a component as a Bean.

Chapter 7

This chapter introduces the BeanBox program, a visual Bean-testing tool provided with the Beans Development Kit (BDK). It describes how to include your Beans for testing in the BeanBox, how to wire Beans together based on their events and properties, and how to save and restore a collection of inter-operating Beans.

Chapter 8

This chapter takes all of the concepts and techniques described in the previous chapters and uses them to develop a fully functioning example. This example includes some Beans, as well as supporting classes, that all work together to create a temperature simulator. The Beans that are developed are wired together using traditional programming, as well as the BeanBox testing tool.

Chapter 9

This chapter introduces the introspection mechanism used to expose the events, methods, and properties of a Bean. It describes how to create special Java classes that explicitly provide this information for your Beans.

Chapter 10

This chapter describes property editors, the Java classes that are used by programming tools to provide visual editors for changing a Bean’s property values. It shows you how to use the standard property editors, and how to create your own custom property editors. Customizers are interfaces to customize the behavior and/or appearance of an entire Bean. This chapter shows you how to create your own customizer, as well as how to use a property editor as part of your customizer.

Chapter 11

This chapter describes the JavaBeans ActiveX Bridge, a tool that allows you to package your Beans as ActiveX components. The mapping between the two technologies is discussed, as well as those parts of JavaBeans that don’t map well to ActiveX. You will also see how Beans can be used in an ActiveX container.

Appendix A

All of the design patterns that are introduced throughout the book are put here for easy reference.

Appendix B

This is a basic class reference for all of the classes and interfaces in the java.beans package. Each class and interface has a brief description, along with a class definition that shows its methods.

Get Developing Java Beans now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.