Skip to main content

Handling Events

  • Chapter
Essential Java Fast

Part of the book series: Essential Java ((ES))

  • 143 Accesses

Abstract

We have looked at how the components in the java.awt package are used to design Web pages, but this is only part of the picture. The pages we have created do not do anything, there needs to be some code in the background which responds to the selecting of an item from a list or clicking on a button. These components have events associated with them, for example when you click on a button or select an item from a list an event occurs. In Java you can detect that event and take some action in response to it. The Java code that you write to deal with events are called event procedures. The event handlers for the mouse and the keyboard are members of the java.awt.component class.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag London

About this chapter

Cite this chapter

Cowell, J. (1997). Handling Events. In: Essential Java Fast. Essential Java Fast. Springer, London. https://doi.org/10.1007/978-1-4471-0629-6_10

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-0629-6_10

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-76052-8

  • Online ISBN: 978-1-4471-0629-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics