This week's book giveaway is in the Agile forum.
We're giving away four copies of Fixing your Scrum and have Ryan Ripley & Todd Miller on-line!
See this thread for details.
Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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: 3244
30
  • 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 .
 
Don't touch me. And dont' touch this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic