Calling ChartPropertyEditPanel with a null legend (an allowed feature) causes it to crap out. This is very simple to fix. I've solved the problem as follows by creating an identical class with the following 2 changes:
in the constructor put the 3 legend lines in the following if:
if (legend != null) {
legendPropertiesPanel = new LegendPropertyEditPanel(legend);
legendPropertiesPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
tabs.addTab("Legend", legendPropertiesPanel);
}
and setChartProperties put the legend line in the following if:
if (chart.getLegend() != null) {
legendPropertiesPanel.setLegendProperties(chart.getLegend());
}
Do you want such reports posted to this board or to the sourceforge support tracker?
Keep up the good work. JFreeChart is excellent.
Bug?--Null legend crashes ChartPropertyEditPanel
RE: Bug?--Null legend crashes ChartPropertyEditPan
Hi Jonathan,
Thanks for your posting - I'll get the fix added to the code asap.
Regards,
DG
Thanks for your posting - I'll get the fix added to the code asap.
Regards,
DG