Fixing JFreeChart bug of slow zooming and XOR rectangle rendering

I am using jFreeChart version 1.0.12 and noticed that my XYPlot chart behaved differently when I ran the application using jdk 1.6 versus jdk 1.5. Specifically, the rendering of the ‘zoom’ rectangle and my own implementation of the XOR rectangle was EXTREMELY slow when using JDK 1.6, but it was perfectly smooth when running with JDK 1.5. I am running on Windows XP service pack 2, but I found a solution:

When running from JDK 1.6, run your Java program from the command line with the following addition: -Dsun.java2d.noddraw=true

The issue may be JDK 1.6’s use of graphic cards for better rendering, this may be interfering with jFreeChart in some unknown way.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s