My createChart class creates faster than processing queries (due to large database, query takes some time to return the processed result to createChart class) thus i get nullpointerexception most of the time...
Any help on this?
How do i implement threading in this case? Any sample on applying threading to create chart (not sample on threading pls... i got tonnes..)?
Creating Chart and Threading
Why do you get NullPointerExceptions? If you don't have data, it doesn't make sense to create the chart. So why did you split both in separate threads? If you have a good reason for this, you need to synchronize both, meaning: let chart wait until data is available.
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0