• 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

Events of the Component Class - JQPlus

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two AWT related questions:
A. The Component class generates ComponentEvent, KeyEvent, MounseEvent, FocusEvent, InputMethodEvent.
I am confused by this Question #954959231579 in JQPlus:
Which listeners can be added to java.awt.Button object:
A. FocusListener
B. ComponentListener
C. WindowListener
D. ActionListener
E. MouseMotionListener
The correct answers are A,B,D, and E
Button extends Component, and ActionListener can be added to Button. My question is whether the Component class can generate ActionEvent or not? As I remember, the Component class does not generate ActionEvent.
B. Does InputMethodEvent have a listener or listeners?
Please help!
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jiapei,
u r right Component class does not generate any ActionEvent but a Button does.
and the ques. is about Button.
and yes InputMethodEvent has listeners.
regards
Deekasha
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you kindly tell me which listeners that the InputMethodEvent have?
 
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
java.awt.event.InputMethodListener
All the standard event names and event listner names follow a pattern.
Event Name : XXXEvent eg. ActionEvent, FocusEvent, InputMethodEvent
Listener : XXXListener eg. ActionListener, FocusListener, InputMethodListener
HTH,
Paul.

------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic