title: Delegation Event Model in Java
body: <p>I'm having a hard time understanding the DEM (Delegation Event Model) in Java. After reading <a href="https://stackoverflow.com/questions/2989005/delegation-example-regarding-java-context">this question with answers</a> I didn't get the explanation I needed.</p>
  
  <p>What are the motivations for using DEM?</p>
  
  <p>My observations in the examples I've seen are:</p>
  
  <ul>
  <li>There is a model with a list of listeners.</li>
  <li>That model also has a methods like <code>fireThisOrThat()</code> that are called from other methods like <code>addThisOrThat</code>.</li>
  </ul>
  
  <p>I will get this on an upcoming exam, that's why I need to understand it and how to use it.</p>