Hi Nebulo,
See below for answers...
nebulo <[EMAIL PROTECTED]> wrote on 06/13/2008 09:16:22 AM:
> i am using Batik to display maps. Additional objects are drawn using
> overlays. But since I implemented the drawing of objects using overlays
> i always get the following exception:
>
> Exception in thread "AWT-EventQueue-0"
> java.util.ConcurrentModificationException
> at
> java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
> at java.util.LinkedList$ListItr.next(LinkedList.java:696)
> at
> org.apache.batik.swing.gvt.AbstractJGVTComponent.
> paintComponent(AbstractJGVTComponent.java:571)
[...]
> I think this happens because the overlays are repainted because of
> transformations (zoom,pan) and at the same time new overlays are added
> using: "getOverlays().add(overlayObject)".
>
> Has anyone similar problems or a suggestion how to solve this problem?
Only update Swing things (like overlays) in the swing thread, and
only update SVG things (like the DOM) in the UpdateManager thread.
So add the overlay in a runnable that you submit to the swing thread.