Setting a Bean's Icon

See Also 

When adding a bean to the Palette window or an application, you can specify one or more icons to represent the bean.

To specify a bean's icon:

  1. In the Projects window, expand the class node that contains your bean.
  2. Right-click the Bean Patterns subnode and choose BeanInfo Editor from the pop-up menu.
  3. In the BeanInfo Editor, select the BeanInfo node. Properties are displayed in the right panel for all four icon types.
  4. Click the ellipsis (...) button for the icon property that describes your icon type.
  5. In the Icon property editor, specify the class path for your icon and click OK. The IDE displays a preview of the image in the rectangular region at the bottom of the Icon property editor.
  6. Once you have set the class path for each icon type you want to add, click OK to close the BeanInfo Editor.

    The BeanInfo class for your bean is regenerated, and code is created to set and get the bean's icon.

See Also
BeanInfo Editor Dialog Box
Adding a Bean to the Palette Window

Legal Notices