• Post Reply Bookmark Topic Watch Topic
  • New Topic

Event IDs

 
Peter Harvey
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to get the ID of an event in Swing? I know that in the old event-handling way of doing things you could get the ID of an event (gotFocus, lostFocus, etc) but in the new way I can't find any. I can get the source, but that's not what I want.
Am I looking too hard, or not looking hard enough?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,
You are both looking to hard and not looking hard enough ...
For the events that directly map to AWTEvents you can still use the getID method. For those that don't (i.e., newly created events found in javax.swing.event), you should not have any need to use such a method. That is because, the implementers have used very specific events that are usually generated by a very specific component.
NOTE: You are correct that there is no getID method available to the new Swing events.
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!