I'm working on a GUI that uses Java3D to display previews of 3d models. I have a JTabbedPane wherein each tab is a Canvas3D to allow loading multiple previews and switching between them. This has been working fine until I got around to adding in the functionality to remove tabs. When a tab is removed, most of the time, the remaining tabs stop rendering the 3d models while rarely they will continue working as intended. There is no apparent set of conditions that can determine when the tabs will continue working and when they won't. Loading up a new preview, however, will bring all other tabs right back to life.
Things I've tried:
- Calling validate on the JTabbedPane
- Calling invalidate on the JTabbedPane and then validate
- Calling invalidate/validate on the new currently selected Canvas3D tab
- Calling repaint() on Canvas3D, JTabbedPane, etc.
- Calling stopView() startView() on the View object attached to the Canvas3D
Calling isViewRunning() returns true even when it appears it isn't so maybe I'm looking in the completely wrong place for this problem. Any thoughts on this would be very much appreciated.