strange!!!
Posted: Mon Nov 05, 2007 4:27 am
I've seen the codes in pakage "FC guide",
I wrote a program similar with the CandlestickChartDemo1.java
here is my program:

I've found nothing about dealing with mouse event...but it was performed well.
How can it be?!
I wrote a program similar with the CandlestickChartDemo1.java
here is my program:
Code: Select all
public class temptest extends ApplicationFrame
{
public temptest(String s)
{
super(s);
OHLCDataset ohlcdataset = createDataset();
JFreeChart jfreechart = createChart(ohlcdataset);
jfreechart.getXYPlot().setOrientation(PlotOrientation.VERTICAL);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setPreferredSize(new Dimension(500, 500));
setContentPane(chartpanel);
}
private static JFreeChart createChart(OHLCDataset ohlcdataset)
{
JFreeChart jfreechart = ChartFactory.createCandlestickChart("Candlestick Demo", "Time", "Value", ohlcdataset, true);
return jfreechart;
}
public static OHLCDataset createDataset()
{ ......//data........}
public static JPanel createDemoPanel()
{
JFreeChart jfreechart = createChart(createDataset());
return new ChartPanel(jfreechart);
}
public static void main(String args[])
{
temptest mytest= new temptest("mytest");
candlestickchartdemo1.pack();
RefineryUtilities.centerFrameOnScreen(mytest);
mytest.setVisible(true);
}
}



I've found nothing about dealing with mouse event...but it was performed well.
How can it be?!