Introduction to JavaBeans

JavaBeans is the component model for Java. It is a mechanism for packaging Java classes so that they can be easily understood and used by IDEs in rapid application development.

JavaBeans can be thought of as packaged classes containing the following elements:

  • Methods— These are public methods that can be invoked on a class.

  • Properties— These are public methods that provide accessor and mutator methods for different attributes of the class. For example, a Java button has a property called label that can be used for getting and setting the text displayed in it.

  • Events— These elements describe the notifications that a class produces. A Java button, for example, has an event called ActionEvent that notifies registered ...

Get Java Server Pages from scratch 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.