Dennis Putnam wrote:The Paint object comes from JFreeChart 'getSeriesPaint(int n)' so I think in this case it is not a method but rather a single color. I couldn't cast Paint to Color so even though that is what it is, it seems like I have to do some kind of conversion. Does that make more sense?
hi Dennis,
I just had a look at JFreeChart, and if I understood it correctly, it is that you first set some Paint with "setSeriesPaint(int series, java.awt.Paint paint)" in one of the implementations of "XYItemRenderer". And the "getxxx" version then returns that Paint. So, in fact you know what Paint is used. If not, then I suggest to use the "instanceof" to find the Paint used. If it is an instance of a multicoloured Paint, decide which Color to use, and if it is a Color, then you're done. Otherwise, well, I have no idea.