首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

哪位高手能排除该错误就把分拿去吧!java.lang.ClassCastException.

2011-11-16 
谁能排除该异常就把分拿去吧!java.lang.ClassCastException...Exception in thread main java.lang.Clas

谁能排除该异常就把分拿去吧!java.lang.ClassCastException...
Exception in thread "main" java.lang.ClassCastException: org.jfree.chart.plot.CategoryPlot cannot be cast to org.jfree.chart.plot.XYPlot
at org.jfree.chart.JFreeChart.getXYPlot(JFreeChart.java:828)
at tony.BarChartDemo.showview(BarChartDemo.java:61)
at tony.BarChartDemo.main(BarChartDemo.java:90)异常 


[解决办法]
类型转换
at org.jfree.chart.JFreeChart.getXYPlot(JFreeChart.java:828) 
检查抛出给的那个类的那一行
[解决办法]
没弄过jfreechart
看看帮助文件~ 

chart.getXYPlot();返回的是org.jfree.chart.plot.CategoryPlot 不能转换到XYPlot plot
[解决办法]
chart
问题出在你创建这个chat的时候,不应该用 CategoryPlot

你去看看你的那个 new 语句吧,hehe .

热点排行