dcsimg

How do I register a customizer for a JavaBean component?

John Zukowski

In the BeanInfo for a component, you associate the customizer with the bean by creating a BeanDescriptor and returning it from the getBeanDescriptor() method.

public class HireBeanInfo
    extends SimpleBeanInfo {
  public BeanDescriptor getBeanDescriptor() {
    return new BeanDescriptor(
      Hire.class, HireCustomizer.class);
  }
...
}