Generating BeanInfo

A BeanInfo class contains information about a bean, including properties, events, and methods. BeanInfo is an optional class, and you can choose what information is included in it.

To generate BeanInfo for a class:

  1. In the Explorer, right-click the Bean Patterns subnode of the class and choose BeanInfo Editor from the contextual menu.

    The BeanInfo Editor dialog box appears. The left panel shows four main nodes (Bean Info, Properties, Event Sources, and Methods), and the right panel shows properties of the selected node. (For more information, see BeanInfo Editor Dialog Box.)

    The Properties node displayed in the left panel contains bean properties that conform to the JavaBeans specification. The properties in the right panel reflect characteristics and settings of objects in the IDE. Thus, in the BeanInfo Editor dialog box, you can set properties of the bean properties themselves.

  2. Make any desired changes to the properties listed in the right panel of the dialog box and click OK.

    The file classnameBeanInfo is generated in the same package as the class.

  3. If you want to add bean properties with nonstandard names, type such code in the Source Editor. The BeanInfo Editor dialog box generates only elements that conform to the JavaBeans specification.
Instead of having your BeanInfo class generated, you can write your own BeanInfo class in the Source Editor, using the BeanInfo template to provide the skeleton code. Choose File New, expand the Beans node, and select BeanInfo.

To edit previously generated BeanInfo:

See also
BeanInfo Editor Dialog Box

Creating a Bean

Editing Source Files

Legal Notices