|
|
Contents |
EventsComponents can provide events to signal when activity occurs (e.g. button pressed or mouse moved). JFormDesigner shows events in the Structure view and event properties in the Properties view.
IDE plug-ins: Double-click on the event in the Structure view to go to the event handler method in the Java editor of the IDE. Add Event HandlersTo add an event handler to a component, right-click on the component in the Design or Structure view and select Add Event Handler from the popup menu. The events popup menu lists all available event listeners for the selected components and is divided into three sections: preferred, normal and expert event listeners.
The After selecting an event listener from the popup menu, you can specify the name of the handler method and whether listener methods should be passed to the handler method in following dialog.
If you add a The "Go to handler method in Java editor" check box is only available in the IDE plug-ins. Stand-alone: After saving the form, go to your favorite IDE and implement the body of the generated event handler method. If you use the Runtime Library
and the Java code generator is disabled, you must implement the handler
method yourself in the target class. See
documentation of method Remove Event HandlersTo remove an event handler, select it in the Structure view and press the Del key. Or right-click on the event handler and select Delete from the popup menu. Change Handler Method NameSelect the event handler in the Structure view, press the F2 key and edit the name in-place in the tree. You can also change the handler method and the "pass parameters" flag in the Properties view. |