Create ShowText.jar
by running BuildShowText.bat
from the (install dir)/samples/jar/
directory.
When you open Visual JavaScript (PR2 or later), create a new project
and add a new page. Double click on the new page (Page1.html) in the Project window.
After bringing up the Palette window using
the Palette icon on the toolbar, use the
Tools | Palette | New menu option
to create a new Palette page (called "Unnamed1" or something similar).
Switch to this new palette page by clicking on the tab.
Import ShowText.jar using the
Tools | Install to Palette | JAR Files option. Using the "Browse" button,
select this newly created JAR,
then select "OK" to add the JAR to the palette.
Drag the newly created Show Text item into the body of the
page. A gray box appears, indicating an applet has been added to
the page.
Select the "Form Elements" tab on the palette. Choose the
"Text" icon and drag it to the body. A new form is created with
a text area.
Select the connection point (the tiny square in the upper right
corner of the text field), dragging and dropping the connection
onto the ShowText applet on the page.
After you drag the text field's connection point onto the applet,
the Connection Builder
will appear. Press "Apply" then "Close" to create a connection.
Press the preview button on the Visual JavaScript toolbar. In a moment,
your browser will load the newly created page. Typing text in the
text area, then pressing the "Tab" key, will cause the applet
to display the text from the textfield.
Congratulations! You have just built and run a Visual JavaScript Crossware Application! The result should look something like the following:
Type some text into the field below then hit the tab key to see the text displayed in the applet above: |
Calc.jar
,
see the JSB Samples page; Calc.jar is a collection
of JavaScript Bean (JSB) components.