Writing Event Handlers

Event code is executed upon a given associated action. This is programming based on the event-driven programming model. In other words, code is executed as a reaction to a given event or events. This code is written within an event-handling stub to allow for better organization of code. JBuilder then manages the relationship or the attachment of these code snippets or business logic to the corresponding component’s event.

Using the Events tab of the Inspector, you can easily attach a new or modify an existing event handler. To attach event-handling code to a component event, you need to do the following:

1.
Choose the appropriate component by selecting it on the user interface or in the Component tree.
2.
Choose the ...

Get Borland® JBuilder™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.