• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to remember what components will send what events?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the mocks, I always find such a question,
Does Component C send Event E?
There are not many components and events in AWT. But the maps between components and events may be a little complicated. Could you tell me a shortcut to remember what component can send what events?
Thank you.
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of such questions can be answered using some logic and commonsense.
First you should understand what and when of the events generated by Component class. All all other components extend from Component, the obviously generate those events (like, MouseEvent, KeyEvent etc).
Other highlevel events can be associated with appropriate components by applying some common sense. Eg. It doesn't make sense for a Button to generate ItemStateChangedEvent, which probably makes more sense for a CheckBox!
Once you start using them a little bit, you'll know them.
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus

Try out the world's only WebCompiler!
www.jdiscuss.com
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi simen,
Tony Alicea has a table that might help posted at http://www.geocities.com/~tony-alicea/eventsandcomponents.html

------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
simen wu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Jane and Paul. I appreciate your helps very much.
 
reply
    Bookmark Topic Watch Topic
  • New Topic