设置JFree图例的图例边框的颜色 [英] Set color for border of legend of JFree Chart

查看:1484
本文介绍了设置JFree图例的图例边框的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题在标题中。详细信息:

Problem is formulated in title. Details:

我在class-theme中有代码,用于为图例框架的边框设置特定的非默认颜色。

I have code in class-theme for set specific non-default-color for the border of legend frame.

LegendTitle legend = jFreeChart.getLegend();
legend.setWidth(100);

在这之后,我需要为图例的边框设置颜色,但没有像

After this I need to set color for border of legend, but nothing like

legend.setBorderColor(Color.green)

我找不到。

请帮我。

感谢您的回复。

推荐答案

当您替换图例边框时:

LegendTitle legend = chart.getLegend();
legend.setFrame(new BlockBorder(Color.green));

这篇关于设置JFree图例的图例边框的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆