`
wanxiaotao12
  • 浏览: 456082 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JFreeChar解决中文乱码问题

 
阅读更多
// 通用的中文问题解决方案
   StandardChartTheme theme = new StandardChartTheme("unicode") {  
      public void apply(JFreeChart chart) {  
          chart.getRenderingHints().put(RenderingHints.KEY_TEXT_ANTIALIASING,  
                  RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);  
          super.apply(chart);  
      }  
   };  
   theme.setExtraLargeFont(new Font("宋体", Font.PLAIN, 14));  
   theme.setLargeFont(new Font("宋体", Font.PLAIN, 14));  
   theme.setRegularFont(new Font("宋体", Font.PLAIN, 12));  
   theme.setSmallFont(new Font("宋体", Font.PLAIN, 10));  
   ChartFactory.setChartTheme(theme); 
 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics