I have a simple static method that, when given a list of numbers has to create a JFrame
holding a histogram.
I use a SwingWorker
(the doInBackground()
does the number crunching, the done() creates the frame and the ChartPanel
).
Now I'd like to return a reference (or a Future) of the JFrame created in done()
to whoever calls this static method. Is there a way to do so?
I am saying returning a Future because obviously the JFrame only exists after the done()
method is done.