GLCanvas in JTabbedPane

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

GLCanvas in JTabbedPane

nick.collier
Hi,

I've got two GLCanvases in two separate tabs in a JTabbedPane. When I switch between them the tab changes but the new canvas is not displayed. For example, if I have a circle on the canvas in tab 1 and a square on tab 2, if I switch from tab 1 to tab 2 I still see the circle rather than the square. There's no errors. This is with jogl-2.0-rc11. Any suggestions appreciated.

thanks,
Nick
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas in JTabbedPane

Sven Gothel
Administrator
On 04/03/2013 10:52 PM, nick.collier [via jogamp] wrote:
> Hi,
>
> I've got two GLCanvases in two separate tabs in a JTabbedPane. When I switch
> between them the tab changes but the new canvas is not displayed. For example,
> if I have a circle on the canvas in tab 1 and a square on tab 2, if I switch
> from tab 1 to tab 2 I still see the circle rather than the square. There's no
> errors. This is with jogl-2.0-rc11. Any suggestions appreciated.

Wiki, FAQ, Bugreport - need more data to process! OSX ?
Also: Test latest aggregated build -> Wiki
Also: We have a unit test for this AFAIK

~Sven

>
> thanks,
> Nick


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

Re: GLCanvas in JTabbedPane

nick.collier
Thanks. I wasn't considering this a bug report. I was hoping it was a known condition with a simple fix. I'll try the latest build and look for the unit test and post a bug report if necessary.

thanks again,

Nick
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas in JTabbedPane

nick.collier
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas in JTabbedPane

Sven Gothel
Administrator
On 04/04/2013 03:57 PM, nick.collier [via jogamp] wrote:
> Look like this is a known issue:
>
> http://forum.jogamp.org/Mac-OS-X-10-7-Oracle-JRE-7-Swing-integration-issues-td4027780.html
>
> Nick
>

maven pushed on jogamp '2.0.2-rc20130404'
based on '2.0.2-rc-20130404',
'http://jogamp.org/deployment/archive/master/gluegen_656-joal_420-jogl_951-jocl_773/'

OSX CALayer / Java7 issues should be fixed w/ this version 'once and for all'

~Sven


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

Re: GLCanvas in JTabbedPane

nick.collier
This post was updated on .
Thanks. I grabbed that but my issue still remains. I did change it to GLJPanel and it now works. Is there a unit test I can run for this?

This is on: OSX 10.7.5 with

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

Nick
Reply | Threaded
Open this post in threaded view
|

Re: GLCanvas in JTabbedPane

Sven Gothel
Administrator
On 04/04/2013 09:02 PM, nick.collier [via jogamp] wrote:
> Thanks. I grabbed that but my issue still remains. I did change it to GLJPanel
> and it now works. Is there a unit test I can run for this?
>

Sorry, it was the heavyweight (HW) CardLayout unit test
TestAWTCardLayoutAnimatorStartStopBug532.

For lightweight (LW) stuff .. you might be right to use GLJPanel
especially on OSX.

If you can, pls add such a unit test (next to the mentioned one)
and allow me to merge/pull it.

~Sven



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

Re: GLCanvas in JTabbedPane

nick.collier
I've written a unit test for this, but have a few questions. I looked through the other unit tests and I don't see a lot of assertEquals etc. So, I'm wondering how to structure the test so its useful to you. Also, I noticed that relying on canvas.isVisble() to test whether the canvas remains in front when it should be in the back doesn't work. I've got two tabs -- one with gl gears in it and the other with a simple JLabel. If I begin with the gl gears showing and switch to the label tab, the gl gears canvas remains in front, but canvas.isVisible returns false. Any suggestions on how to properly determine that it is or is not actually visible would be appreciated.

thanks,

Nick