Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Event Objects

  • When you receive an event either in handleEvent() or in another event method, the event you receive is described by an Event object defined in (java.awt.Event).

  • An event object contains a number of public variables that describe the event. For example, the most often used is event.target, which is the originator of the event. Thus, if a button is pressed and an action event is posted, the target field will equal the button that generated the event.

  • The following table outlines some of the other properties

Value Description
Object target The object receiving the event.
long when Event time stamp.
int id The type of the event.
int x The x coordinate of the event.
int y The y coordinate of the event.
int key The key that was pressed, if any.
int modifiers The state of the modifier keys, if any.
int clickCount The number of consecutive mouse clicks, if any.
Object arg An arbitrary argument.

  • You can easily use any of this information in your event handling logic in order to perform tests, debugging or anything else.

Additional Resources:

Event Propagation
Table of Contents
Event Modifiers


Up to => Home / Authoring / Scripting / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers