javafx-embed-swing/src/javafx/embed/swing/JFXPanel.java

Print this page

        

*** 658,668 **** private final AWTEventListener ungrabListener = new AWTEventListener() { @Override public void eventDispatched(AWTEvent event) { if (event instanceof sun.awt.UngrabEvent) { ! Platform.runLater(new Runnable() { @Override public void run() { if (JFXPanel.this.stagePeer != null) { JFXPanel.this.stagePeer.focusUngrab(); } --- 658,668 ---- private final AWTEventListener ungrabListener = new AWTEventListener() { @Override public void eventDispatched(AWTEvent event) { if (event instanceof sun.awt.UngrabEvent) { ! SwingFXUtils.runOnFxThread(new Runnable() { @Override public void run() { if (JFXPanel.this.stagePeer != null) { JFXPanel.this.stagePeer.focusUngrab(); }
*** 691,701 **** } }); updateComponentSize(); // see RT-23603 ! Platform.runLater(new Runnable() { @Override public void run() { if ((stage != null) && !stage.isShowing()) { stage.show(); firstPanelShown = true; --- 691,701 ---- } }); updateComponentSize(); // see RT-23603 ! SwingFXUtils.runOnFxThread(new Runnable() { @Override public void run() { if ((stage != null) && !stage.isShowing()) { stage.show(); firstPanelShown = true;
*** 709,719 **** * Notifies this component that it no longer has a parent component. * When this method is invoked, any KeyboardActions set up in the the * chain of parent components are removed. */ @Override public void removeNotify() { ! Platform.runLater(new Runnable() { @Override public void run() { if ((stage != null) && stage.isShowing()) { stage.hide(); } --- 709,719 ---- * Notifies this component that it no longer has a parent component. * When this method is invoked, any KeyboardActions set up in the the * chain of parent components are removed. */ @Override public void removeNotify() { ! SwingFXUtils.runOnFxThread(new Runnable() { @Override public void run() { if ((stage != null) && stage.isShowing()) { stage.hide(); }