We migrated our swing application from JAVA 1.4 to JAVA 5, the problem we are facing is that the ALT + Key is not working in Java 5 after an internal frame is closed. It works as long as any of the internal frames are not closed.
It again works when it is minimized and maximized.
What I understand is, it is not getting the focus back to the Menu bar or it is not repainting the Menu properly which causes the ALT+key not to work.
Is there any specific reason for an already working code behaving like this, is this anyway related to the deprecated method setNextFocusableComponent which I don't think so.
suneel surya wrote:
We migrated our swing application from JAVA 1.4 to JAVA 5,
I can't help with the problem but you have migrated from a stone age JRE to a bronze age JRE. Since 1.5 is well past it's end of life and you are going to the expense of upgrading to Java 5 I just wonder why you haven't gone the whole hog and upgraded to 1.7 . I suspect that I am not alone in having archived all my 1.5 JDK with the intention of only bringing them back if absolutely necessary. This means it will be difficult for anyone to give you definititive help even if you can produce an SSCCE that illustrates the problem.
posted 6 years ago
Got the solution, The InternalFrame close method was calling setClosed(true); which was taking the focus away from the menu after closing that frame. I replaced it with setVisible(false) and it started working .
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book