I’m using an AWTPanel in order to integrate a JMonkey display (a SimpleApp that works with an AWTPanel) with a larger swing application. This is a simulation application where the user can start, stop a simulation run. The displays are created each simulation run and destroyed when the run is finished. Typically, a display is destroyed in response to a button press and so the destroy is at least begun in Swing’s EDT. With this in mind, I’ve two questions:
- What’s the appropriate way to destroy and clean up a SimpleApp and the AWTPanel?
- Given that this process will at least begin on the EDT thread are there any threading concerns – for example, should I enqueue a call to SimpleApp.stop() or is it OK to call that on the EDT thread.
Thanks,
Nick