0

As other questioners have noted, the Java AWT/Swing focus mechanism on Windows has changed starting with Java 7. While the documentation says "the mechanism is transparent for the user," it has broken some aspects of an application.

I don't want to get too bogged down right now in details of what has changed, or things that can be done to work around the problem; rather, I have one specific question. Is there a way to force JRE 7 or 8 to use the pre-Java 7 native focus mechanism on Windows, either through a system property or an API?

Thanks for any insight that anyone can provide.

Community
  • 1
  • 1
Wayne Citrin
  • 133
  • 7
  • you could check the users mechine and in form them to update String version = System.getProperty("java.version"); if(version not equal good_version){ // open download page to java } or in windows force to run the jar file with an older jre: http://stackoverflow.com/questions/13047122/how-to-set-jar-application-to-use-java-6-instead-of-7 – TheBetaProgrammer Jun 28 '14 at 00:00
  • Thanks, that's not a bad idea. But we don't have control over the JRE that's on the user's machine, and all other features work just fine with Java 7 and 8 except for one. If we could force the newer JREs to exhibit the older focus behavior, that would be ideal, but it sounds like it might not be possible. – Wayne Citrin Jun 28 '14 at 17:25

0 Answers0