Using the Connection Wizard


The Connection Wizard enables you to set events between two components without having to write much (or any) code by hand. When you choose two components to be "connected", the first is the one that will fire the event, and the second one will have its state affected by the event.

To start the Connection Wizard:

The Connection Wizard opens to connect the chosen components.

The Connection Wizard enables you to set the connection parameters in two or three steps:

Connection Source

The first step enables you to choose the event of the source component on which the operation is to be performed and the name of the event handler method generated.

Note: If you choose an event that already has an event handler attached (the name of the event handler is visible in the tree of events after the event name - like actionPerformed [button1ActionPerformed]), when clicking Next, you will be asked if you want to delete the old event handler. If you answer yes, the old event handler is replaced with the connection code when the Connection Wizard is finished.

Connection target

The second step enables you to specify the operation that is to be performed on the target component. There are four options which can be changed using the radio buttons along the top of the dialog box:

Choosing property value or method parameters

If you have chosen Set Property, Method Call, or Bean in the previous step, the third step will enable you to specify the values for the target property or parameters for calling the target method. If you have chosen Method Call, the dialog box will display a list of all parameters types as tabs, where each tab represents a single method parameter.

On each tab, you can set the source from which the value (of the specified type) is acquired:

If you click Finish, a new event handler will be generated with code reflecting the settings entered in the second and third step.


Contents Prev Next Index