• Post Reply Bookmark Topic Watch Topic
  • New Topic

AWT's event model, Newbie Question

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am from JSP background and is new to Swing and Awt. In AWT's event model, is there any concept similiar to Javascript DOM's event propagation? Say, I have a container containing a button. If I click on that button, in the browser's DOM model, the button plus its containing DOM element will each receive a mouseclick event. This is natural if we consider the click on the button is visually on top of both the container and the button itself.

But it seems that for a AWT container, if I click on its button, the container itself won't receive any event - just the button. Is that true?
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that is true. You can't even add an ActionListener to a Container
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!