Setting Events With the Connection Wizard

See Also

You can use the Connection wizard to set events between two components within a form without having to write code manually.

To set and event using the Connection wizard:

  1. Click the Connection Mode button (Image of Connection Mode button) in the GUI Builder toolbar.
  2. In the GUI Builder or Inspector window, select the component that will fire the event. Notice that the selected component is highlighted in red when selected.
  3. Select the component whose state you want to affect with the event.
  4. On the Connection wizard's Select Source Event page, select the event that the trigger component will fire from the Events list by expanding the event type directory nodes. Accept the default handler method name or type in a new name and click Next.
  5. On the Specify Target Operation page, specify the operation to be performed on the target component by selecting the appropriate radio button and choosing from the list of operations. Click Next. Notice that if you chose a method call with no parameters, the Finish button of the wizard becomes available.
  6. (Optional) If you wish to enter event handler code directly, choose the User Code radio button and click Finish. The insertion point is placed in the new event handler in the Source Editor, where you can write the event handler code yourself.
  7. On the Enter Parameters page, specify the values for each tab's target property or method by selecting the source from which each parameter's value is acquired.
  8. You can choose to get the parameter from any of the following:

    The source code generated for each of the parameters is displayed in the Generated Parameters Preview field.

  9. Click Finish.

    The IDE automatically generates the code to connect the form's components.

See Also
Managing Component Events
Designing Java GUIs with the GUI Builder
About Java GUIs

Legal Notices