Login  Register

Re: jogl + swing help, please.

Posted by imakerobots on Mar 09, 2015; 6:57pm
URL: https://forum.jogamp.org/jogl-swing-help-please-tp4034071p4034126.html

Update!

I added a JSplitPane to Arm3.  Everything resizes correctly and the swing components on the right appear to work.  Looks like your suggestion to use GLJPanel was the ticket.  Yay!

The menu is fixed and updates correctly.  I  forgot JMenu.updateUI().  Also Yay!

When a popup dialog appears I stop receiving keyboard events.  I still have my mouse events.  I see in http://www.java-gaming.org/index.php/topic,6173. they recommend using a keylistener on the parent frame instead of keyadapter on the glwindow.  I tried this method and found that it never regains focus.  Then I found http://stackoverflow.com/questions/5150964/java-keylistener-does-not-listen-after-regaining-focus and the fix there seems to work.  Haven't tested text inputs in the right hand side yet, I imagine they'll type and cause events in the gl window at the same time.  Mostly Yay?

When I go to export my project, is there a way to get the native jars to be included into the main jar?  I tried "package required libraries into generated JAR" but it didn't.  For now I've copied them into the same folder as the executable jar.  Feels messy and prone to breakage.  What did I miss?

Thank you all!  I feel like I've been stuck on this for ages and in a few quick messages you solved my dilemma.  Kudos, thank you, gracias... this is a big huge win.  Thank you.