• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Display > The Event Loop

5.6. The Event Loop

Like most modern window systems, SWT supports an event-driven user interface. This requires an explicit event loop that repeatedly reads and dispatches the next user interface event from the operating system. When an event is dispatched, it is delivered to a widget for processing. For example, when the user moves the mouse, a mouse event is delivered to the control that is under the cursor.

When there are no events to be dispatched, the program “goes to sleep” waiting for the next event, yielding the CPU to other programs on the desktop.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint