new NumberAxis("X"), new NumberAxis("Y"),
new XYLineAndShapeRenderer());
plot.addAnnotation(new XYBoxAnnotation(10.0, 12.0, 3.0, 4.0,
new BasicStroke(1.2f), Color.red, Color.blue));
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;
}
catch (NullPointerException e) {
e.printStackTrace();