Java 7, Java3D, Borderlayout problem

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 7, Java3D, Borderlayout problem

LordSmoke
Hi, Folks. Happy Holidays to all.

With the winter break at the university, I have been able to program a bit. Working on another project I ended up upgrading to Java 7 on my Mac. Then, going back to my Java3D program, I found that everything compiles and runs under 7, but there appear to be problems with the border layout manager. All subprojects are compiled with the (new) default 1.7. The Java3D window shown below on the right illustrates the problem - the canvas does not position properly, it overwrites the bottom (SOUTH) panel. The same code, but with the startup stub set to Java 1.6 runs just fine as shown below, left.


Above left - code running on Java 1.6, right - on Java 1.7

Here is the initialization code for the canvas and graphics controls:

    private void initialize() {
        this.setLayout(new BorderLayout());
        this.setSize(612, 273);
        this.add(getPlotControlPanel(), java.awt.BorderLayout.SOUTH);
        this.add(plotter.getCanvas3D(), java.awt.BorderLayout.CENTER);
    }


The layout manager appears to work as advertised. Below is running on Java 1.7, red label is CENTER, button is SOUTH.


A search here didn't turn up any references to similar problems. Any ideas? Could this be a Java3D issue?
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

gouessej
Administrator
Hi

At first, please use the very latest pre-version of Java3D with the latest aggregated build of JogAmp and let us know whether your bug is still reproducible.

Edit.: Maybe it looks like that.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

LordSmoke
In reply to this post by LordSmoke
You guys rock!
Upgraded to latest jogl and java3d and all is well. Would have saved me some public embarrassment if I would have hit on the correct keyword. Oh, well. Thanks a bunch.
-LS
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

LordSmoke
In reply to this post by LordSmoke
Oops, spoke too soon. Better, but not there, yet.

Below are three pics of the screen as it should appear (running under 1.6)

Initial screen, no data loaded, single row of controls at bottom.


Data loaded, double row of controls at bottom.


Data loaded, window rescaled, data rescaled, and double row of controls at bottom.


Now with the new libraries running under Java 1.7
Data loaded, but second row of controls not visible - actually barely visible, but obscurred by canvas3d.


Window rescaled. Canvas3d seems rescaled only in y dimension, second row of controls still obscured.


Window stretched vertically. Grey area at top. Image adjusted to obscure second row of controls.


Stretched horizontally. Image distorts vertically.

Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

Sven Gothel
Administrator
On 12/30/2013 11:09 PM, LordSmoke [via jogamp] wrote:
> Oops, spoke too soon. Better, but not there, yet.

You say 'latest jogl', did you use 2.1.4-rc-20131224:
  http://jogamp.org/deployment/archive/master/gluegen_757-joal_507-jogl_1183-jocl_896-signed/

?

If you did and we still have such glitches,
I would love to see those in JOGL only unit tests
or little examples ofc ..

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

LordSmoke
The 2.1.4 link did the trick. Of course, nothing is easy - I ran into the gluegen-rt.jar and java-all.jar download problems (http://forum.jogamp.org/Can-t-add-jogl-all-jar-and-gluegen-rt-jar-for-2-0-2-to-Netbeans-library-tc4030013.html), but couldn't remember the solution. Solution: download the .gz versions and unzip. All is well so far.

-LS
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

hharrison
Thanks a lot for testing, really appreciate it!

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

gouessej
Administrator
I agree with you and I feel better now.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

LordSmoke
In reply to this post by LordSmoke
I guess I owe you some screen shots of the working program. Java 7.

Default size with data...


Vertical window resize...


Horizontal window resize...


Thanks to all, LS
Reply | Threaded
Open this post in threaded view
|

Re: Java 7, Java3D, Borderlayout problem

gouessej
Administrator
Nice job, I like seeing more and more Java3D applications using the latest version :)
Julien Gouesse | Personal blog | Website