您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Extend Index

Extend Page # 2

Graphical user interface system communication: event messages

A particular type of message an object of a class can receive is that of an event. Events are messages that are generated by user interface objects, such as the windows, menus, mice, keyboards etc.

Examples of events include:

  • window resized
  • window minimised
  • window closed
  • mouse button pressed down
  • mouse button released
  • mouse cursor moved to new X, Y position on screen
  • a key was pressed
  • a window has been moved (so may need to be repainted by a program)
  • a button was clicked
  • a menu item was chosen

Those objects that play a role in processing input from the user not only have methods for messages they expect to be sent by other object, but also have methods specially for dealing with user interaction events.

Extension activity 5 – Explore events from input devices

Back to top

 basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg