Adding a reusable part and connecting to it
The reusable part you created is much like any of the parts on the parts palette. As a matter of fact, you can add your part to the parts palette if you think it will be used often in your development efforts. You can also use the Add Part window to add the part without having it appear on the parts palette.
Adding a reusable part
To add the SecurityFormView part to the BuySecurityView and SellSecurityView parts, ensure that a Composition Editor is open for each visual part and follow these steps for each part:
1. Select add part
Add part icon
from the tool bar in the Composition Editor.
The Add part window opens: 
Add part window
2. On the Add Part window, in the Class name field, type SecurityFormView.
Note:
If you do not remember the class name of the part you want to add, select the Browse button. This opens a list of all available classes.
Note:
You do not have to specify a name in the Part name field. If you do not specify a name, one is provided for you just as when you add a part from the parts palette.
3. Because you will be using this visual part like any other part, make sure Part is selected in the Part type field.
4. Select OK.
The mouse pointer is now loaded with your SecurityFormView part.
5. Click mouse button 1 on the Window part to add the part as a child of the window part.
6. Move the reusable part to the appropriate place within the window.
Notice that your reusable composite visual part is manipulated as a single part now.
Making the event-to-action connections
To set the input focus to the appropriate Text part when the window is opened, you need to connect the openedWidget event of the Window part to the setFocus action of the Text part.
1. Within the Composition Editor for the BuySecurityView do the following:
a. Connect the openedWidget event of the Buy Security Window part to the setFocus action of the Shares to buy Text part.
b. Save the part and close the Composition Editor for this visual part.
2. Repeat the previous two steps for the SellSecurityView visual part, giving the initial input focus to the Shares to sell Text part.
Make sure you save each of the parts and close both of the Composition Editor windows.
Last modified date: 03/26/2020