JDK-8203855 : Focus problems with embedded Swing components
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u172
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2018-05-27
  • Updated: 2018-05-29
  • Resolved: 2018-05-29
Description
ADDITIONAL SYSTEM INFORMATION :
Any windows version, any JRE 7 or above

A DESCRIPTION OF THE PROBLEM :
After the re-design of Swing in Java-7, many (if not all) tools that try to embed swing component suffer focus issues.

Internet Explorer: JDK-8056915 
JavaFX: JDK-8088540
Java-in-.NET: https://jnbridge.com/support/knowledge-base/java-in-net-embedding-and-java-7-and-8
SWT: https://bugs.eclipse.org/bugs/show_bug.cgi?id=377104

JDK-8056915 provides a fix for Internet Explorer only. I have tested on SWT that if the SWT embedded composite fakes to be Internet Explorer, focus behavior starts to work correctly.

REGRESSION : Last worked in version 8u161

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See linked bug reports

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When a embedded swing component is activated, the hosting component is notified of this focus in a correct way.
ACTUAL -
The hosting component is not notified of the swing component being activated

CUSTOMER SUBMITTED WORKAROUND :
See attached bug reports for work-arounds

FREQUENCY : always



Comments
As per description the embedded swing component had focus issue after redesign of Swing in JDK 7. Albeit, the fix provided with JDK-8056915 w.r.t "Focus lost in applet when browser window is minimized and restored" appears to work for IE, but does not work in other cases. Note sure, if we consider this as a concern with limited support for Plugin in browsers versions.
28-05-2018