• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

ALT + Key is not working in Java 5 after an internal frame is closed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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.


Thanks in advance.
 
Rancher
Posts: 3297
31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cross posted: http://stackoverflow.com/questions/21296990/alt-key-is-not-working-in-java-5-swing-after-an-internal-frame-is-closed
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
suneel surya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic