Take the final CentralPerk.java, PerkEvent.java,
and PerkListener.java files from the
From Kiva Han to Central Perk exercise and place them in their own
package.
Create the associated BeanInfo class for CentralPerk. In it, set the descriptive name of
the Bean to "Billboard".
The next thing you need to do is to create a manifest file for the Bean's .jar file. Normally,
the jar command can create the manifest for you. However, in order for the Bean-builder tool
to know that one of the .class files is a Bean, you have to manually create a manifest file.
For every .class file, you need to include a line of the form:
Name: Marcel/CentralPerk.class
Make sure you use a UNIX-style separator character ('/') between directory names and filename. The
DOS-style separator ('\') is not valid here.
For the class that is a Bean, include a second line after the Name: line
Java-Bean: True
Between each entry, include a blank line.
The actual filename you use for the manifest does not matter.
From the directory above your package directory, create the jar file.
Startup the BeanBox.
Load the jar file with the 'LoadJar' menu choice under the 'File' menu. The Billboard bean
should now appear in the Toolbox. Try it out.
The task numbers above are linked to the
step-by-step