Keeping beans and BeanInfo classes in the same package

If a Java bean and its associated BeanInfo class are in the same package, then the Introspector will be able to find the BeanInfo class. This is the simplest but also least likely scenario because coupling the run-time and design time classes in the same package makes for more work at deployment time to separate them.

For example, a project called MyProject contains a package called myclasses that contains the classes MyJavaBean and MyJavaBeanBeanInfo. Whenever the bean myclasses.MyJavaBean is used, either for development of a class within MyProject or for development of a class in another project that includes MyProject in its Java build path, the introspector will locate its BeanInfo class myclasses. MyJavaBeanBeanInfo.

Related concepts
BeanInfo classes and introspection

Related tasks
Specifying the location of BeanInfo classes

Related reference
BeanInfo classes for JRE classes
BeanInfo classes for the Visual Editor for Java

(C) Copyright IBM Corporation 2000, 2003. All Rights Reserved.