Chapter 27. JavaBeans

As you have learned, one of the primary advantages of object-oriented programming is the capability to reuse an object in different programs. If you have created a spellchecker object that works great with your word processing program, you should be able to use the same object with an email program also.

Sun has extended this principle with the introduction of JavaBeans. A JavaBean, also called a bean, is a software object that interacts with other objects according to a strict set of guidelines. By following these guidelines, the bean can most easily be used with other objects. Once you know how to work with one JavaBean according to these rules, you know how to work with all of them.

Another advantage of JavaBeans occurs ...

Get Sams Teach Yourself Java™ 2 Platform in 21 Days Professional Reference Edition 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.