Generating BeanInfo
See Also
A BeanInfo class contains information about a bean, including properties, events,
and methods. BeanInfo is an optional class, and you can decide what information
is included in it.
To generate BeanInfo for a class:
- In the Projects window, right-click the Bean Patterns subnode of the
class and choose BeanInfo Editor.
The BeanInfo Editor dialog box appears. The left panel shows five main
nodes: Bean Info, Bean, Properties, Event Sources, and Methods. The right
panel shows properties of the selected node. For information about the nodes
and subnodes in the BeanInfo Editor, see BeanInfo Editor
Dialog Box.
- 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.
- The BeanInfo Editor dialog box generates only
elements that conform to the JavaBeans specification. If you want to add
bean properties with nonstandard names, you should write your own BeanInfo
class in the Source Editor. Use the BeanInfo template to provide the skeleton
code. Choose File > New,
expand the Beans node, and select BeanInfo.
To edit previously generated BeanInfo:
- Right-click the class's Bean Patterns node and choose BeanInfo Editor. Make
sure you choose this command on the Bean Patterns node for the class node
and not for the BeanInfo node.
- See Also
- BeanInfo Editor Dialog Box
- Creating a Bean
- Editing Source Files
Legal Notices