RFR: 8247163: JFXPanel throws exception on click when no Scene is set

Kevin Rushforth kcr at openjdk.java.net
Thu Jun 11 00:36:42 UTC 2020


On Tue, 9 Jun 2020 10:39:29 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

> Fixing exception when clicking on JFXPanel when no Scene is set.
> 
> quick test: `./gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests: test --tests *javafx.embed.swing.JFXPan* --info`
> 
> It's a regression from my previous PR: https://github.com/openjdk/jfx/pull/25

The fix looks correct to me (I haven't tested it yet). I left a minor comment inline.

modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 452:

> 451:                 // which doesn't have any side-effects when called multiple times.
> 452:                 if(stagePeer != null) {
> 453:                     int focusCause = AbstractEvents.FOCUSEVENT_ACTIVATED;

Minor: space after the `if`

-------------

PR: https://git.openjdk.java.net/jfx/pull/248


More information about the openjfx-dev mailing list