Re: getting a swing application to run my simple jogl application, it goes into an infinite loop of creating windows instead of displaying graphics
Posted by Steven Miller on Mar 10, 2011; 5:26am
URL: https://forum.jogamp.org/getting-a-swing-application-to-run-my-simple-jogl-application-it-goes-into-an-infinite-loop-of-creats-tp2655798p2659191.html
Thanks for the responses guys. I'll do that Wade Walker
To elaborate then Justin mentioned the following:
>The constructor of SimpleScene creates a new SimpleScene ands adds it to the canvas... which then calls the
> constructor of SimpleScene. You can see where this is going :)
I can see where this is going now that you pointed this out. The code used to have a main function in place of where the constructor is now. Where would be the best place or way to do this so that I can have a standalone class and initiate objects from this class, but not repeatedly call it over and over? I am a little new to jogl and am learning a little at a time so some I would appreciate suggestions and help. Would it make sense to put the canvas in the GUI class and call it from the GUI? How would this work with the current threading framework?