问题
Problem is formulated in title. Details:
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)
I couldn't found.
Help me, please.
Thanks for replies.
回答1:
You can specify a new color when you replace the legend's border:
LegendTitle legend = chart.getLegend();
legend.setFrame(new BlockBorder(Color.green));

来源:https://stackoverflow.com/questions/15163545/set-color-for-border-of-legend-of-jfree-chart