Generating Declarations: Generating Declarations
- From the JavaStar main menu, select Create Test Script.
- Enter
namedb
as the Class name.
- Click Start.
- Once the Record/Playback window is open, click the Declarations button.
This opens Generate Declarations instruction dialog, giving you information on how to select components. You can leave this dialog open or dismiss it by clicking OK.
- Select the main window of the Name Database as your component.
Move your cursor over the main window and press Ctrl-Alt-F10.
A new Generate Declarations window opens, prompting you for a package name and a class name.
- Type
NameData
in the Package field.
You're not required to enter a package name. If you don't define a name, JavaStar stores the class containing the declarations in the working directory. If you do define a package, JavaStar stores the declaration classes within a directory named for your package, stored a subdirectory of your working directory.
- Type
MainWin
in the Class field and click OK.
The log file in the Record/Playback window (see Figure 4-4) shows the components JavaStar writes out to the class you specified. Generating declarations for a window is that simple.

Record/Playback window while generating declarations
- Generate declarations for the Names and Search windows.
To do this:
- Click the Names button to open the window.
Put your cursor over any part of the Names window and press Ctrl-Alt-F10.
- In the Generate Declarations window, keep the package name the same and type
NamesWin
for the class name. Click OK.
- Repeat this process for the Search window, saving the declarations to
SearchWin
.
- Stop the generate declarations process.
In the Record/Playback window, click Stop.
- Quit the Record/Playback window.
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.