Get compiling error in Applet1 Demo

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kc

Get compiling error in Applet1 Demo

Post by kc » Wed Mar 12, 2003 5:01 am

Hi,

I'm trying to compile the Applet1 demo in version 0.9.6 which is written by Dave Gilbert and I got the following errors. Any idea to solve this problem.

Thank in advance.

kc.

Applet1.java:99: cannot resolve symbol
symbol : method setSeriesPaint (java.awt.Paint[])
location: class com.jrefinery.chart.plot.XYPlot
xyplot.setSeriesPaint(new Paint[] {Color.red, Color.green});
^
Applet1.java:100: cannot resolve symbol
symbol : method setSeriesStroke (int,java.awt.BasicStroke)
location: class com.jrefinery.chart.plot.XYPlot
xyplot.setSeriesStroke(0, seriesStroke);
^
Applet1.java:109: cannot resolve symbol
symbol : method setCrosshairVisible (boolean)
location: class com.jrefinery.chart.axis.HorizontalDateAxis
domain.setCrosshairVisible(false);
^
Applet1.java:115: cannot resolve symbol
symbol : method setCrosshairVisible (boolean)
location: class com.jrefinery.chart.axis.VerticalNumberAxis
range.setCrosshairVisible(false);
^
4 errors

Part of the code :

this.total = new TimeSeries("Total", Millisecond.class);
this.total.setHistoryCount(30000);
this.free = new TimeSeries("Free", Millisecond.class);
this.free.setHistoryCount(30000);
TimeSeriesCollection dataset = new TimeSeriesCollection();
dataset.addSeries(total);
dataset.addSeries(free);

BasicStroke seriesStroke = new BasicStroke(2f,
BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);

HorizontalDateAxis domain = new HorizontalDateAxis("Time");
VerticalNumberAxis range = new VerticalNumberAxis("Memory");

XYPlot xyplot = new XYPlot(dataset, domain, range);
xyplot.setBackgroundPaint(Color.black);
xyplot.setSeriesPaint(new Paint[] {Color.red, Color.green});
xyplot.setSeriesStroke(0, seriesStroke);

domain.setAutoRange(true);
domain.setLowerMargin(0.0);
domain.setUpperMargin(0.0);
//domain.setGridPaint(Color.green);
//domain.setGridStroke(gridStroke);
domain.setTickLabelsVisible(true);
//domain.setGridLinesVisible(false);
domain.setCrosshairVisible(false);

range.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
//range.setGridPaint(Color.green);
// range.setGridStroke(gridStroke);
//range.setGridLinesVisible(true);
range.setCrosshairVisible(false);

David Gilbert

Re: Get compiling error in Applet1 Demo

Post by David Gilbert » Wed Mar 12, 2003 6:27 pm

It looks like you have the 0.9.4 version of the applet demo. It was updated to work with 0.9.6...can you check that you have the latest version.

Regards,

Dave Gilbert

Locked