Graphics Configuration Error

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Scott Centille

Graphics Configuration Error

Post by Scott Centille » Sat Nov 17, 2001 3:10 am

I have a Jsp working great with the software that is running on a server with a graphics card that only supports 256 colors. However, when running the Jsp on a server with a graphics card that only supports 16 colors, I get the following error:

java.lang.ExceptionInInitializerError: java.lang.RuntimeException:
Unable to create a suitable default GraphicsConfiguration. Try changing your Display Settings.

Does JFreeChart have a minimum graphics card color requirement?
It looks like 256 colors is the minimum color required for creating the jpg or is there an attribute that I can set to overcome this error?

Thanks in Advance!

Scott Centille

David Gilbert

RE: Graphics Configuration Error

Post by David Gilbert » Sat Nov 17, 2001 11:05 am

Hi Scott,

Not sure. The only color issue I'm aware of is that the GradientPaint used for the chart background generates a lot of different color shades, and that has caused problems for people trying to encode GIF files (which only support 256 colors).

Maybe it's the GradientPaint giving you trouble also. Try calling the setChartBackgroundPaint(Color.blue) in the JFreeChart class and see if your problem goes away.

Regards,

DG.

Scott Centille

RE: Graphics Configuration Error

Post by Scott Centille » Mon Nov 19, 2001 3:24 pm

Thanks for the Quick Reply!

After installing a new graphics card which supports 256 colors onto the Production Server, it fixed the problem. So, apparently within
NT 4.0 Sp6a , the minimum graphics card color requirement should be 256 colors and not 16. Hope this helps anyone else facing a similiar problem.

Regards,

Scott Centille

Locked