Hello.
I have a problem with my applet using JFreeChart.
When I show my applet with appletviewer, it's ok. But if I
show my applet in browser the message "Applet prueba class prueba
got a security violation: method verificatin error". Why?
My source code is:
public class prueba extends Applet{
Number[][] data = new Integer[][]
{
{ new Integer(12274123) , new Integer(14234225),
new Integer(13223545) , new Integer(15976234) },
{
new Integer(25126782) , new Integer(27456237),
new Integer(22124345) , new Integer(19874235) },
{
new Integer(31234554) , new Integer(28523123),
new Integer(35736012) , new Integer(32123753) }
};
CategoryDataSource myDataSource = new DefaultCategoryDataSource(data);
JFreeChart mychart = JFreeChart.createVerticalBarChart(myDataSource);
JFreeChartPanel myChartPanel = new JFreeChartPanel(mychart);
Title titulo = mychart.getTitle();
Plot myplot = mychart.getPlot();
Axis myHorizontalAxis = myplot.getAxis(Plot.HORIZONTAL_AXIS);
Axis myVerticalAxis = myplot.getAxis(Plot.VERTICAL_AXIS);
DefaultCategoryDataSource d = (DefaultCategoryDataSource) myDataSource;
String[] names = new String[]{"Region 1","Region 2","Region 3"};
String[] categories = new String[]{"Quarter 1","Quarter 2","Quarter 3","Quarter 4"};
public void establecer_caracteristicas()
{
myHorizontalAxis.setLabel("Eje X");
myVerticalAxis.setLabel("Eje Y");
d.setSeriesNames(names);
d.setCategories(categories);
mychart.setTitle("Prueba");
}
public void init()
{
this.establecer_caracteristicas();
add(myChartPanel);
}
}
PROBLEM WITH APPLET
RE: PROBLEM WITH APPLET
Are you using the Java plugin or a browser that supports JDK 1.2 or later? JFreeChart won't run on JDK1.1 because it needs the Java2D API.
Regards,
DG.
Regards,
DG.