dcsimg
How to find out the Source object to create an event.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   praveen_kumar
Posted On:   Wednesday, July 19, 2006 04:28 AM

Is there a way to determine the source object to create an event, so that the process event of that source object can be called. Imagine that i only know of the keycode and the modifiers and dont know the source, now how do i find out the component for which the event has to created(source.processevent()). Some articles say that awt uses its peer object to find this out. The component i am using is a custom made component and has no peer. Do i have to use focus as the key to find out the Source?? or Use (x,y) and match with the bounding box of the component?? or is there any other way??    More>>

Is there a way to determine the source object to create an event, so that the process event of that source object can be called.




Imagine that i only know of the keycode and the modifiers and dont know the source, now how do i find out the component for which the event has to created(source.processevent()). Some articles say that awt uses its peer object to find this out.





The component i am using is a custom made component and has no peer.





Do i have to use focus as the key to find out the Source??



or


Use (x,y) and match with the bounding box of the component??



or

is there any other way??    <<Less
About | Sitemap | Contact