Hi all,
I just changed the look and feel of my applet from Windows to Java (cross platform). All containers & components change their "look and feel" accordingly, except of the chart. Is this kind of functionality missing, or am I doing something wrong? Thanks a lot!
Cheers,
Marko
PS: David, keep up the good work!
Look and Feel
Re: Look and Feel
What things in particular? There's not a lot to change except perhaps the popup menu on the ChartPanel, or the border if you've added one. I'm not entirely sure what is required to make a look and feel change happen, but I'm happy to update the code if someone provides some pointers...
Regards,
DG.
Regards,
DG.
Re: Look and Feel
hmmm..chart is just an image. what should look fdifferent in various lafs?
maybe You can post Your code and say what You'd expected to happened?
maybe You can post Your code and say what You'd expected to happened?
Re: Look and Feel
Hi again,
ok, I was not really precise... All my other panels change their color to light grey (among some other changes like different looking scrollbars etc.), but the chart panel still has the same darkgray as in the Windows Look and Feel. I know that the color can be changed individually, but wouldn't it be nice if it would change automatically?! Unfortunately I don't know myself where to add the according piece of code.
Thanks!
Cheers,
Marko
ok, I was not really precise... All my other panels change their color to light grey (among some other changes like different looking scrollbars etc.), but the chart panel still has the same darkgray as in the Windows Look and Feel. I know that the color can be changed individually, but wouldn't it be nice if it would change automatically?! Unfortunately I don't know myself where to add the according piece of code.
Thanks!
Cheers,
Marko
Re: Look and Feel
The chart background defaults to Color.lightGray. This doesn't always match the shade used in a particular user interface. There is probably a way to detect the look and feel change in the ChartPanel and try to update the chart background color accordingly...if someone wants to contribute code to do this, I'll add it in.
Regards,
DG.
Regards,
DG.
Re: Look and Feel
I believe the only thing you would need to do would be to set the default color to
SystemColor.control
instead of an actual color. This will also handle the situation where the user changes the colour scheme in Windows or motif etc.
Martin Smith
SystemColor.control
instead of an actual color. This will also handle the situation where the user changes the colour scheme in Windows or motif etc.
Martin Smith