This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes EVENT.getSource() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "EVENT.getSource()" Watch "EVENT.getSource()" New topic
Author

EVENT.getSource()

Bhaskar Sanikommu
Greenhorn

Joined: Dec 03, 2002
Posts: 1
Hi,
Can any one explain me in detail the difference between EVENT.getSource(); and EVENT.getTarget();. I often see using them interchangebly, and iam confused.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
In the java.awt.Event class, I don't see any getSOurce/getTarget methods.
There is a getSource method in java.util.EventObject, but there is no getTarget method in any AWT Event related classes (except in java.beans.EventHandler which has nothing to do with this issue).
Please tell us which class you are talking about so that we can be on the same page. Thanks.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: EVENT.getSource()
 
Similar Threads
Who called?
listening to disposed child components
access the sources of the JButtons with no labels but Icons
How to determine object type.
Calculator Memory buttons not working?