How to Add Plugins
In this tutorial, we will show you how to embed any Java Component. When installing ProtoLoop Designer, there are many components that come along with it.
But you may want to used some very good controls created by yourself or someone else.
How to
Create a new prototype. Add a 'Java Component' from the Palette - Addons.
Drop it on the composer.
You will see a small control labeled 'Bean'.
Save your prototype. This will create the necessary directory that we need in the next step.
Copy the archive(s) file to a directory under your working directory project.
See the path of this directory in your settings identity page.
So if your working directory is 'C:\Documents and Settings\User/.protoloop/Prototypes/128' and your project is 'Embedded Java Component', you will place your jars files in
C:\Documents and Settings\User/.protoloop/Prototypes/128/Embedded Java Component directory. It is a good pratice to put yours jars in the lib directory.
You will have to edit the properties 'Jars' and 'Class Name'.
Edit the 'Jars' property. In this tutorial, we add the tetris.jar that we copied previously in the lib directory. We found this game at http://www.percederberg.net/home/java/tetris/tetris.html
Click the 'OK' button.
Edit the 'Class Name' property.
Press the 'Preferred Size' button on the composer toolbar to size the new component to it's preferred size.
Here is the result of adding a 'Tetris' game component.
We will complete the prototype with some text explaining how to use the game, a title, a link to the author web site and a close button.
Now it is time to see if all this works. Click the 'Run Prototype' button on the toolbar.
Hum hum. Has you can see, I am not very good playing 'Tetris'.