Creating and modifying a BeanInfo class

When you create a new bean, it does not initially have a BeanInfo class. VisualAge automatically creates a BeanInfo class for a bean if one does not exist and you do any of the following:

You can explicitly create a BeanInfo class in the BeanInfo page as follows:

  1. From the Features menu, select New BeanInfo Class to open the SmartGuide - BeanInfo Class window.

  2. In the SmartGuide - BeanInfo Class window, you can specify a display name and short description to use for the bean. If you want to provide customized initialization of bean properties, specify a customizer class for the bean. Select Next to open the SmartGuide - Bean Icon Information window.

  3. In the SmartGuide - Bean Icon Information window, you can specify files containing icons for the bean. Select Finish to create the BeanInfo class.

You can also create or replace a BeanInfo class in the BeanInfo page as follows. From the Features menu, select Generate BeanInfo class. VisualAge generates bean information code that describes the bean and all features that you have added or promoted to the bean interface.

To modify the information in a BeanInfo class, edit bean information properties in the Information pane of the BeanInfo page. If no feature is selected in the Features pane, you can edit bean information for the bean. If a feature is selected, you can edit bean information for the feature.

If you want a bean to be serialized, set the Hidden-state property of the bean to true in the Information pane.


Related concepts
Bean interfaces and BeanInfo
Generated BeanInfo descriptor code (an advanced topic)
Object serialization in VisualAge

Related procedures
Defining bean interfaces for visual composition

Related references
BeanInfo Class SmartGuide
Bean Icon Information SmartGuide
Information pane--BeanInfo page