★ wanayoo — archive 1999 http://java.sun.com/beans/docs/initial.htmlNouvelle recherche | Portail wanayoo
JavaBeans Documentation
Feedback Java Search JavaBeans Web


JavaBeans Development Software JavaBeans Documentation JavaBeans FAQ JavaBeans Development Tools Training + Support JavaBeans Events JavaBeans Directory The JavaBeans Advisor Staying in Touch JavaBeans JavaBeans Development Software JavaBeans Documentation JavaBeans FAQ JavaBeans Development Tools JavaBeans Training + Support JavaBeans Events JavaBeans Directory Market Your Beans Staying in Touch JavaBeans

JavaBeansTM under JDK 1.0.2

Some of the features of the full 1.0 Java Beans architecture rely on new Java core interfaces such as reflection and serialization that are being added in JDK 1.1.

However it is possible to begin initial development of Java Bean components under JDK 1.0.2, using a subset of the beans architecture that is compatible with JDK 1.0.2.

To enable this, JavaSoft has defined a set of rules for "transitional" Beans, which are fully compliant with the 1.0 Java Beans architecture, but which can be used to build applets and applications that can run on JDK 1.0.2 and on JDK 1.0.2 enabled systems such as Netscape Navigator 3.0 and Internet Explorer 3.0. We also provide three transitional classes to aid migration to JDK 1.1. See Appendix A of the Java Beans spec for more details on transitional beans.

These transitional beans will necessarily only use a subset of the full bean model. However this subset includes the basic property/method/event mechanisms, so that a transitional bean is still very useful within a JDK 1.0.2 environment.

Principal requirements for JDK 1.0.2 beans:

  • The bean should use the getFoo/setFoo patterns for properties, as defined in the beans spec.

  • All of the bean's persistent state should be accessible via getFoo/setFoo properties. This allows external tools to save and restore the beans state using the property accessor methods.

  • Any events the bean fires should use the new AWT event model and should use the sunw.util.EventObject and sunw.util.EventListener interfaces to mark events and event listeners. However in interacting with AWT, the bean must of necessity use the old AWT event model to catch AWT events.

  • If the bean is prepared in the future to use automatic serialization then it must inherit from the sunw.io.Serializable marker interface.
Of these, the only part that may seem surprising is the use of the new AWT event model under JDK 1.0.2. Here is an example applet using the Java Beans event model under JDK 1.0.2

For intrepid early developers, here are the three transitional classes and the sources for the event examples as a ZIP file and a compressed tar file.


Software | Documentation | FAQ | Tools | Training & Support | Events | Directory | Market Your Beans
Staying in Touch | Search | Home | java.sun.com home

Send questions or comments about this site to webmaster@wombat.eng.sun.com.


Sun Home Page

Copyright © 1997-99 Sun Microsystems, Inc., 901 San Antonio Rd., Palo Alto, CA 94303 USA.
All rights reserved.