jfreechart crashes when using Yahoo Finance Quotes

和自甴很熟 提交于 2019-11-29 12:09:44

CandlestickDemo works for me with v1.0.15 and either of your queries. I made two changes:

  • Construct the GUI on the event dispatch thread; failure to do so causes a data race with non-deterministic results:

    EventQueue.invokeLater(new Runnable() {
        @Override
        public void run() {
            new CandlestickDemo("GOOG").setVisible(true);
        }
    });
    
  • Omit the backing buffer, although it's probably irrelevant:

    ChartPanel chartPanel = new ChartPanel(chart, false);
    
  • Addendum: For reference, it looks like a call to ParamChecks.nullNotPermitted() was applied in r2692, replacing an explicit check, but the renderer was otherwise unchanged.

  • Addendum: Under v1.0.14, the example works correctly with the DefaultTimeline of DateAxis, which changed substantially in the interim.

  • Addendum: @David Gilbert notes that the relevant changes may be found in r2465.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!