ConcurrentModificationException explained solution

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
GeniuZ
Posts: 9
Joined: Sun Apr 05, 2009 9:14 am

ConcurrentModificationException explained solution

Post by GeniuZ » Wed Jun 10, 2009 1:39 pm

Hello guys,
I found here JFreeChart is not thread safe and I can't modify chart without care for it.
But I don't know how to handle it. I have random thread which can modify my chart anytime.
I think, I can add "synchronized" field before any chart modification,
but I need add it before chart paint too. And I don't know, where to put it.
Thank you for help
Jiri

GeniuZ
Posts: 9
Joined: Sun Apr 05, 2009 9:14 am

Re: ConcurrentModificationException explained solution

Post by GeniuZ » Wed Jun 10, 2009 3:20 pm

Or can I wait for Swing painting finish and in addition suspend/lock Swing engine during realize chart changes?

Locked