JFreeChart的中文乱码问题 知道的帮忙解决一下

JFreeChart的中文乱码问题 知道的帮忙解决一下
先给出我测试类的代码 该类的编码已经设置为GBK了

package  com.test.jfreechart;

import  org.jfree.chart.ChartFactory;
import  org.jfree.chart.ChartFrame;
import  org.jfree.chart.JFreeChart;
import  org.jfree.data.general.DefaultPieDataset;

public   class  JFreeChartTest  {
    
public static void main(String[] args) {
        
// 定义数据集
        DefaultPieDataset dpd = new DefaultPieDataset();

        
// 往数据集里面加入数据
        dpd.setValue("管理人员"25);
        dpd.setValue(
"市场人员"20);
        dpd.setValue(
"开发人员"45);
        dpd.setValue(
"其他人员"10);

        
// 用工厂类创建饼图
        JFreeChart chart = ChartFactory.createPieChart("公司人员结构图", dpd, true,
                
truefalse);

        
// 在Swing中显示该饼图
        ChartFrame chartFrame = new ChartFrame("公司人员结构图", chart);

        chartFrame.pack();

        chartFrame.setVisible(
true);
    }

}


运行结果:

你可能感兴趣的:(JFreeChart的中文乱码问题 知道的帮忙解决一下)