How to change the background color of the tooltip

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

How to change the background color of the tooltip

Post by Guest » Tue May 11, 2004 9:05 am

Hi,
I want to change the background color to the "standard" color of a tooltip R: 255 G: 255 B: 225.
But the chart I use (PieChart) shows a tooltip with R: 172 G: 210 B: 248 only!!

I have analyzed all the source code of jfreeChart, but I have not found the snippet where to set the background color.

Please, can anybody help me??

Thanks

Susann

nikster
Posts: 46
Joined: Wed Nov 19, 2003 4:34 pm

Post by nikster » Tue May 11, 2004 11:09 am

hello,

this is not really a JFreeChart question, rather a general Java question. JFreeChart just uses the ToolTip methods built into Swing.

you need to create your own subclass of ChartPanel and override createToolTip(..). see there:
http://java.sun.com/j2se/1.4.2/docs/api ... ateToolTip()

for all you want to know about tooltip handling (and more), see the java tutorial on how to use ToolTips here:
http://java.sun.com/docs/books/tutorial ... oltip.html

Guest

Post by Guest » Tue May 11, 2004 12:37 pm

thank you, that works fine... :-)

Locked