![]() |
![]() |
![]() |
![]() |
Importing JavaBeansTM
Our thermostat application is going to use a JavaBean which is not initially on the Object Palette in the Composer. This bean is the rotary knob which you saw in the finished application. We will now add this new part to the palette.
- In the IDE, open the 'import' menu and choose the first item, titled 'JavaBeans'. The 'Import JavaBeans' window will appear. On the left of the window will be a tree listing the items in your classpath. You can expand any item in the tree by double clicking it.
- In the tree, expand the node of the item which has your Project directory. (This will be something similar to \Simplicity\Project). The tree will expand to show you the directories in your Project directory.
- Expand the 'datarep' directory under the Project directory.
- Single-click the 'beans' directory under the 'datarep' directory. All of the Java classes in the 'beans' directory will be listed in the Available Classes list.
- Select Knob from this list and press the Add button at the bottom of the window.
- Press Ok.
You have just added a JavaBean to the Object Palette of any Composer in this Project. If you wish to see more details about the bean, you can double-click its icon in the 'Java Beans' group in the IDE. The Knob bean that we just added is included with Simplicity as a demonstration. You can find thousands of different JavaBeans, though, on the Internet that you can use in your projects.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |