title: Concurrent Modification Exception Cause by Painting?
body: <p>I have been having a lot of trouble with the Concurrent Modification Exception error. With the help of the community I managed to fix my last error, however I think this error is more puzzling.</p>
  
  <p>I am now getting a concurrent modification error while painting, I am worried that this error occurs in the paint function itself. Unlike my last error I am nto removing an entity, in that case I completely understood what was going on just not how to fix it, this error on the other hand I do not understand.</p>
  
  <pre><code> TowerItr = activeTowers.iterator();
  
              while (TowerItr.hasNext()) {
                  try {
  
                  theTower = (ArcherTower) TowerItr.next();
  
  
                  g.drawImage(tower, theTower.y * Map.blockSize, theTower.x * Map.blockSize, this);
  
                  } catch (ConcurrentModificationException e) {
  
  
                  }
              }
  </code></pre>
  
  <p>The line that throws the exception is this one:
  theTower = (ArcherTower) TowerItr.next();</p>