Notes for more details event reference

You can also define behaviors that instances of a class should exhibit when specific events are triggered. In this example, we want the width of the component to grow when the user mouses over it, and to shrink back to its initial value when the user mouses out. In a real life component, this kind of behavior can be used as a visual clue to indicate that the component has the focus. You use the onmouseover and onmouseout attributes of the <borderedbox> class to code the event handlers. All the instances of that class will automatically exhibit that behavior.