EventListener editor

GUI design is not an end in itself, sooner or later the GUI should do something.Therefore the Java programming language gave us Events and EventListeners.

You add or remove EventListeners in the . (By double-clicking the listener name, you remove a listener from the component.)

Tip: To keep track of all attached listeners, press <L>, this all listeners' type together with their declared methods as long as the key is pressed.

The 'Define Listener' dialog

Every EventListener has one or more listener methods which you want to forward to your application.
Deselect the Forward method checkbox if you don't want to forward this listener method.
Fill in the name of the target method (this method will appear in your exported class).
Select Forward event if you want the event to be forwarded to the target method.
With PropertyChangeListener you can specify a property name, then the listener will be invoked only if the specified property changed.

Of course, you can forward events from different components to the same target method. You could even forward methods from different EventListener types to equally-named methods (that is, you overload the method name) but you better choose method names which reflect the purpose of the method.

Note: To test your listeners, open a test frame and trigger the listener, then RADi the received event.

See also:
Property editors
Custom editors
Exporting layout classes