【发布时间】:2016-04-03 18:10:22
【问题描述】:
我正在尝试将 背景颜色 更改为我的条形图,但到目前为止似乎没有任何效果
下面是我的代码:
JFreeChart expbarchart = ChartFactory.createBarChart("Monthly Expenditures", "Expenditure Type", "Amount (£)", barexp, PlotOrientation.VERTICAL, false, true, false);
ChartPanel expframe = new ChartPanel(expbarchart);
expframe.setLocation(695, 49);
expframe.setSize(641,500);
expframe.setBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(173, 216, 230), null));
graphpanel.add(expframe);
我尝试过.setbackground(),但它似乎不起作用
谢谢
【问题讨论】:
标签: java swing jfreechart