Lotus BeanMachine Reference Guide

The Java Window

In the Java window, you can write your own Java methods that will be included in your applet. These new methods are available in connections, as actions listed with the main Applet part.



At the top of the Java window, there is a toolbar to help you get started writing your Java methods:

New Pastes in a template for a new method
Save Saves the current method
Delete Deletes the current method
Paste Part Pastes in the Java code that accesses a part in your applet
Paste Property With a part name highlighted in the editing area of the Java window, use this tool to paste in a get or set method for one of the part's properties
Paste Action With a part name highlighted in the editing area of the Java window, use this tool to paste in a method call to one of the part's actions.
Paste Java Pastes in a Java statement, such as an if or while statement

While you are creating your Java code, if you click with the right mouse button, a popup menu is displayed providing clipboard functions (cut, copy, paste, etc).

The drop-down list labeled Other Methods shows a list of all the methods you've written so far. To switch back to a method you've worked on before, just select it from the list. To delete a method, just blank out all of its text in the editing area, and then select the Save button on the toolbar. The Other Methods list also includes three special items called imports, declarations, and implements. Select imports to enter any special Java import statements that are needed to compile your method. Select declarations to add your own instance variables to the applet. Select implements to add your own interfaces to the applet. Most of the time, you won't have to use these special items.

The Java methods that you write are compiled when you press the Run button on the Composer's toolbar. If you have any syntax errors, you will get an error message when you try to run the applet. Compiler messages are recorded in the Log window.