Hi!
I have a split view with a jglpanel on the left and some swing components on the right. Some user actions create a modal dialog. When the dialog would close focus would not return to the jglwindow. I tried // focus not returning after modal dialog boxes // http://stackoverflow.com/questions/5150964/java-keylistener-does-not-listen-after-regaining-focus frame.addFocusListener(new FocusListener(){ public void focusGained(FocusEvent e){ //System.out.println("Focus GAINED:"+e); } public void focusLost(FocusEvent e){ //System.out.println("Focus LOST:"+e); // FIX FOR GNOME/XWIN FOCUS BUG e.getComponent().requestFocus(); } }); Which works fine ...until I put jtextfields in the right-hand view, and now I can't type in the fields because focus is jailed to the jglwindow all the time. When I click on the jtextfield the cursor immediately disappears. Please: What's the better way to solve this? Thank you! The code is here: https://github.com/MarginallyClever/rotarystewartplatform2 PW: WASDQE to fly around, RFTGYHUJIK to move the platform. The goal is to make precision movements with the text fields and a "go" button. |
Administrator
|
Please check whether it is reproducible even with a canvas not using JOGL. I suspect that it is a pure Swing problem once again.
Julien Gouesse | Personal blog | Website
|
I believe you are correct. I see no reason why JOGL has to be involved. I guess I posted here to also give you a status update on my project?
|
Administrator
|
It's ok for me, I just want to make things clear. Actually, when you call requestFocus(), you can't be sure that it will always work and some components can still "steal" the focus.
I'll probably use some of your STL files to test our STL importer in JogAmp's Ardor3D Continuation, thanks. Edit.: Her/his fix shouldn't be used everywhere, I don't reproduce this bug under Mageia Linux 4 with KDE 4. It would be better to fix this bug directly in OpenJDK.
Julien Gouesse | Personal blog | Website
|
sure. if you leave the STL files in the package for future testing, please give attribution. On Mon, Mar 23, 2015 at 2:54 AM, gouessej [via jogamp] <[hidden email]> wrote: It's ok for me, I just want to make things clear. Actually, when you call requestFocus(), you can't be sure that it will always work and some components can still "steal" the focus. -- Dan Royer :: Marginally Clever :: Raising Robot Literacy :: +1.604.916.2281 |
Administrator
|
Yes, of course, I always do so as you can see here: http://svn.code.sf.net/p/tuer/code/pre_beta/NOTICE.txt
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |