filmov
tv
Applet Architecture || Java Tutorial for beginners

Показать описание
Applet Architecture
1)An applet is a window-based program.
2)Applets are event driven.
o An applet waits until an event occurs. The run-time system notifies the applet about an event by calling an event handler that has been provided by the applet. Once this happens, the applet must take appropriate action and then quickly return.
3)The user initiates interaction with an applet—not the other way around.
o The user interacts with the applet as he or she wants, when he or she wants. These interactions are sent to the applet as events to which the applet must respond.
o Examples:
when the user clicks the mouse inside the applet’s window, a mouse-clicked event is generated.
If the user presses a key while the applet’s window has input focus, a keypress event is generated.
applets can contain various controls, such as push buttons and check boxes. When the user interacts with one of these controls, an event is generated.
1)An applet is a window-based program.
2)Applets are event driven.
o An applet waits until an event occurs. The run-time system notifies the applet about an event by calling an event handler that has been provided by the applet. Once this happens, the applet must take appropriate action and then quickly return.
3)The user initiates interaction with an applet—not the other way around.
o The user interacts with the applet as he or she wants, when he or she wants. These interactions are sent to the applet as events to which the applet must respond.
o Examples:
when the user clicks the mouse inside the applet’s window, a mouse-clicked event is generated.
If the user presses a key while the applet’s window has input focus, a keypress event is generated.
applets can contain various controls, such as push buttons and check boxes. When the user interacts with one of these controls, an event is generated.