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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.