Java Reference
In-Depth Information
Figure 19.14
Drag the event arrow from the Customer bean to the JSlider bean.
The Interaction Wizard dialog box shown in Figure 19.15 appears. The wiz-
ard steps through the process of hooking these two beans together. To bind
two properties together, the Create Interaction option should be Event
Adapter, which it is by default. The only event that the Customer bean gener-
ates is a propertyChange event, which again is already selected.
Click the Next button of the wizard, and you will see a list of target methods
found in the JSlider class, as shown in Figure 19.16. This is where you deter-
mine which method is invoked on the JSlider bean when the accountNumber
property changes in the Customer bean. We will bind accountNumber to the
value property of the JSlider, so select the setValue() method, as shown in Fig-
ure 19.16, and click the Next button.
Figure 19.15
Interaction Wizard dialog box assists in hooking two beans together.
Search WWH ::




Custom Search