họ sẽ chuyển đổi một danh sách được sử dụng để sản xuất một Iterator cho việc in ấn các phím và các giá trị. Thông báo số thứ hai để có được (). Đây là giá trị mặc định được sản xuất nếu không có bất kỳ mục nhập cho rằng giá trị quan trọng. | Once you have your Bean properly inside a JAR file you can bring it into a Beans-enabled program-builder environment. The way you do this varies from one tool to the next but Sun provides a freely available test bed for JavaBeans in their Bean Builder. Download from beans. You place a Bean into the Bean Builder by simply copying the JAR file into the correct subdirectory. Feedback More complex Bean support You can see how remarkably simple it is to make a Bean but you aren t limited to what you ve seen here. The JavaBeans architecture provides a simple point of entry but can also scale to more complex situations. These situations are beyond the scope of this book but they will be briefly introduced here. You can find more details at beans. Feedback One place where you can add sophistication is with properties. The examples above have shown only single properties but it s also possible to represent multiple properties in an array. This is called an indexed property. You simply provide the appropriate methods again following a naming convention for the method names and the Introspector recognizes an indexed property so your application builder tool can respond appropriately. Feedback Properties can be bound which means that they will notify other objects via a PropertyChangeEvent. The other objects can then choose to change themselves based on the change to the Bean. Feedback Properties can be constrained which means that other objects can veto a change to that property if it is unacceptable. The other objects are notified using a PropertyChangeEvent and they can throw a PropertyVetoException to prevent the change from happening and to restore the old values. Feedback You can also change the way your Bean is represented at design time Feedback 1. You can provide a custom property sheet for your particular Bean. The ordinary property sheet will be used for all other Beans but yours is automatically invoked when your Bean is selected. Feedback