Exercise 10: Updating DeskClock
In this exercise, you will update the Clock bean in the DeskClock
project by reimporting the Clock.jar file that you modified in
the previous exercise to the component library. You will also update
the DeskClock project to use this latest version.
- Make sure you are in the DeskClock project. Open the Project
Manager window and check to see that DeskClock is highlighted. If not,
double-click on the DeskClock name to open the project.
- Choose GUI -> Import Components to Palette.
- Click the Browse button on the JAR tab.
- Load the Clock.jar file, which contains the modified Clock bean.
- In the JAR page, click on Clock.class to select it.
- Click on the Beans folder name in the Palette Components list.
- Click the Add button that is between the JAR page and the
Palette Components list.
- Click OK to add the beans to the palette.
An automatic update occurs for all the beans in
Clock.jar. You wiil be notified that an update has been detected.
- Click Import and Upgrade when the Upgrade detected dialog box opens.
- Click Reload Design in the Reload Design After Update dialog box
opens.
Look in the layout window and check that the name of the month appears
larger.
- Click Build in the main toolbar.
- Click Run in the main toolbar after the build completes. Your
DeskClock should look like this now:
You have completed the tutorial on the production and use of beans in
Java WorkShop.
For an example of another bean project, see the JellyBean example in
the examples directory.
On Microsoft Windows 95 and Windows NT:
JavaWorkShop-install-dir-path\examples\JellyBeanExample
On Solaris:
Root-JavaWorkShop-install-dir-path/examples/JellyBeanExample