You can use the Java Beans view to delete an event that you added to a component.
To delete an event from a component, select it in the Java Beans view and use the Delete pop-up menu option or the keyboard delete key.
If having deleted the callback method there are no remaining method body implementations on the listener and the listener is an anonymous inner class, then the listener itself is removed together with the method that registers it with the source. In the previous example, the Window listener only has a windowOpened callback, so when windowOpened is deleted then the listener and the addWindowListener(...) statement that adds it to the source will be removed.
Delete in Expert Events mode can be thought of as deleting the selected tree item from its parent.
The listener itself can also be selected and deleted. This
will remove the listener from the Java Bean. If the listener is an anonymous
inner class it will be removed from the source. However, for a name listener
class it will still remain after it has been removed from Java beans that
use it.
Parent topic: Handling events with the visual editor
Related concepts
The Java Beans view
Related tasks
Adding events to a component
Viewing events for a component
Viewing the source for an event