JDK-8169309 : Migrate SwingNode to the new float API of JLightweightFrame
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-07
  • Updated: 2016-12-01
  • Resolved: 2016-12-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Blocks :  
Relates :  
Description
After JDK-8153522 fix JLightweightFrame capable with non-integer X/Y scale. JavaFX should support it at least for Windows platform.
Comments
Changeset: ea3b5eecfcb8 Author: ssadetsky Date: 2016-12-01 15:51 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/ea3b5eecfcb8 8169309: Migrate SwingNode to the new float API of JLightweightFrame Reviewed-by: kcr
01-12-2016

+1
01-12-2016

http://cr.openjdk.java.net/~ssadetsky/8169309/webrev.01/
24-11-2016

he fix itself looks good to me, and I tested it on Mac and Windows with the jdk-9+145 promoted build (which does not include the fix for JDK-8153522) and with a local build of jdk9/client (which does include that fix). It works as expected. I do have comments on the code changes. At least the first needs to be fixed: SwingNode.java 1. Please revert the change to the imports (we don���t use wildcard imports) 2. The following are unrelated to your fix and probably should be reverted: 188 focusedProperty().addListener((observable, oldValue, newValue) -> 189 activateLwFrame(newValue)); ... 298 SwingFXUtils.runOnFxThread(SwingNode.this::requestFocus); ... 483 private final InvalidationListener locationListener = o -> locateLwFrame(); ... 577 NodeHelper.treeVisibleProperty(this).addListener( 578 (observable, oldValue, newValue) -> setLwFrameVisible(newValue));
22-11-2016

Webrev: http://cr.openjdk.java.net/~ssadetsky/8169309/webrev.00/
09-11-2016

As long as it doesn't cause runtime errors or functional regressions, then you are right, and we can review it prior to JDK-8153522 being in a promoted build. I will take a look when I review it.
07-11-2016

Kevin, SwingNode has run-time binding to the JLightweightFrame using reflection. Classes from sun.awt.* are used everywhere in FX, so probably it is resolved in JDK-8161704, the same could be done for sun.swing.* . The fix should not cause any compilation or run-time errors with any version of JDK but non-integer scale will work only if JDK contains JDK-8153522 fix.
07-11-2016

This is blocked by JDK-8161704. It also requires a new JBS issue to be filed to bump the minimum JDK build used as the boot JDK for JavaFX to whatever promoted build eventually contains the fix for JDK-8153522.
07-11-2016