Bug 1255

Summary: Newt canvas in Miglayout fail to resize OR occupy complete JFrame instead of its target layout cell
Product: [JogAmp] Jogl Reporter: Martin <martin.pernollet>
Component: openglAssignee: Sven Gothel <sgothel>
Status: IN_PROGRESS ---    
Severity: major CC: gouessej
Priority: P4    
Version: 3.0.0   
Hardware: All   
OS: macosx   
Type: DEFECT SCM Refs:
Workaround: ---

Description Martin 2015-10-21 14:58:59 CEST
When adding a jzy3d chart with a CanvasNewtAwt embedding a NewtCanvasAWT,
it is displayed properly BUT if you magnify and then downsize the frame, 
the NewtCanvasAWT will first grow but won't be able to decrease its size. 
It does not happen when adding the CanvasNewtAwt to a JFrame with BorderLayout.Center, but it does happen when I use Miglayout to show multiple widgets.

SEE SCREENSHOTS OF THIS BUG :
https://raw.githubusercontent.com/jzy3d/jzy3d-jogl-debug/master/images/jzy3dbug/3-after-downsize.png

------------------------------------
HOWEVER, when removing Jzy3d layer and simply adding a JOGL demo to chartPanel, NewtCanvasAWT appears on top of Miglayout. Which is not what I wanted to demonstrate but still a very annoying thing :)

SEE SCREENSHOTS OF THIS BUG :
https://raw.githubusercontent.com/jzy3d/jzy3d-jogl-debug/master/images/demobug.on.macos10.8.5/2-after-click-occupy-full-frame.png

------------------------------------
To reproduce these problems you can use this piece of code : https://github.com/jzy3d/jzy3d-jogl-debug

Using 
- JOGL 2.3.2
- MacOSX 10.8.5 on MacBookPro Retina display
- JRE 1.6
Comment 1 Julien Gouesse 2017-05-12 09:47:22 CEST
JRE 1.6? Oracle Java, OpenJDK or Apple Java?
Comment 2 Martin 2017-05-12 10:34:29 CEST
I am now using 
- Oracle JVM 25.40-b25 for Java 1.8.0_40-ea
- MacOS Sierra 10.12.3
- Jogl 2.3.2

The downsizing bug problem still exists despite a little different.

I reproduce easily with either pure JOGL snippet as well as Jzy3d 1.0 pre-built examples (http://download.jzy3d.org/api/1.0/jzy3d-guide-1.0-demos-exe.zip)
Comment 3 Martin 2017-05-15 09:16:22 CEST
A Jzy3d user facing the resize problem confirms he is NOT using MigLayout, so the problem is not related to the UI layout framework.
Comment 4 Sven Gothel 2019-03-30 03:16:39 CET
(In reply to Martin from comment #3)
> A Jzy3d user facing the resize problem confirms he is NOT using MigLayout,
> so the problem is not related to the UI layout framework.

We need a simple (w/o jzy3d) standalone test case.
Please reopen if bug still persist and reproducable w/ that test case.
I walk the bug list currently and I cannot work with the given information.
Thank you.
Comment 5 Martin 2019-04-05 19:47:00 CEST
Thanks!

I actually already left a code reproducing the problem.

The exact program to run is located here : https://github.com/jzy3d/jzy3d-jogl-debug/blob/master/src/main/java/org/jzy3d/demos/browser/DemoBrowser.java

It shows problems embedding JOGL GLCanvas in a Miglayout application which is explained in the Javadoc.
Comment 6 Sven Gothel 2019-04-05 22:52:05 CEST
(In reply to Martin from comment #5)
> Thanks!
> 
> I actually already left a code reproducing the problem.
> 
> The exact program to run is located here :
> https://github.com/jzy3d/jzy3d-jogl-debug/blob/master/src/main/java/org/
> jzy3d/demos/browser/DemoBrowser.java
> 
> It shows problems embedding JOGL GLCanvas in a Miglayout application which
> is explained in the Javadoc.

Thank you. 
Hence I reopened it and earmarked for 2.4.0 for the time being.

Next step would be to create a unit test with your example,
then to fix the issue.