Thread-safe way to draw JFreeChart as pdf off of the EDT?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Commander Salamander
Posts: 21
Joined: Sat Jan 05, 2008 2:14 am

Thread-safe way to draw JFreeChart as pdf off of the EDT?

Post by Commander Salamander » Fri Apr 02, 2010 1:48 am

I'm using the iText library and the

Code: Select all

JFreeChart draw(Graphics2D g2, Rectangle2D area)
method to draw a plot to a pdf file so that they can be edited in Adobe Illustrator. The chart being drawn is being displayed in a ChartPanel at the same time. If I draw the pdf on the EDT my GUI freezes up, but I'm unsure whether I can draw the pdf in a thread-safe way so that I can include a progress dialog.

Any advice would be appreciated!

Locked