For the first time, I'm writing a Java application that is graphics-intensive without a GUI. It generates images by creating a BufferedImage and working with its Graphics2D object. Images are written to files using ImageIO.write.
I need to decide whether to work in the main thread, or the Event Dispatch Thread.
In favor of the EDT, I would do all the graphics updates in the EDT if I were writing a GUI.
In favor of the main thread, the application will compute continuously for the whole time it is running, without any user interaction to break things up.
Which thread for non-GUI graphics?
Non EDT is what I would have guessed (and the way I've always coded it).
But could you confirm, does the app. have a GUI?
No, the app does not have a GUI. It needs to be able to run unattended.
That settles it, forget the EDT & use whatever Thread you like (including the default one given to the app.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With