NewtCanvasAWT does not appear in Java 11+
Posted by hil23Ak on Mar 01, 2021; 4:26pm
URL: https://forum.jogamp.org/NewtCanvasAWT-does-not-appear-in-Java-11-tp4041028.html
I have an application that integrates JOGL into Swing. It has been stable for years in Java 8/9/10. I am now trying to migrate to Java 11+ using JOGL 2.4.0.
After trying several vendors and versions of JDK, they all have the same behavior: my NewtCanvasAWT no longer appears.
It is added to the ContentPane of a JInternalFrame with:
newtCanvasAWT = new NewtCanvasAWT(glWindow);
final Container container = new Container();
container.setLayout(new BorderLayout());
container.add(newtCanvasAWT, BorderLayout.CENTER);
setContentPane(container);
Visually, it is as if the ContentPane is empty. In terms of processing, everything still works correctly. The call stacks get executed fully and OpenGL buffers are written to. This is confirmed by AWTGLReadBufferUtil.readPixelsToBufferedImage() still returning a rendered buffer.
Has something changed in Java 11 with how JOGL/NewtCanvasAWT/something interacts with Swing? Or maybe my method of adding to Container and ContentPane is no longer fully correct?
If anyone has any ideas, I would appreciate it. Thank you!