Mac: JFXPanel deadlocks in jnlp mode

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 8u40
    • Component/s: client-libs
    • Environment:

      MacOS 10.8

    • b36
    • os_x

        The following app hangs when launched on MacOS X with jdk8u40 as a jnlp app (netbeans project is attached):

        package cft;

        import javafx.application.Platform;
        import javafx.embed.swing.JFXPanel;
        import javafx.scene.Scene;
        import javafx.scene.control.Button;
        import javafx.scene.layout.StackPane;
        import javax.swing.JFrame;
        import javax.swing.SwingUtilities;

        public class CFT {
                 private static void initAndShowGUI() {
                     JFrame frame = new JFrame("FX");
                     frame.setSize(100, 100);
                     final JFXPanel fxPanel = new JFXPanel();
                     frame.add(fxPanel);
                     frame.setVisible(true);

                     Platform.runLater(new Runnable() {
                         @Override
                         public void run() {
                             initFX(fxPanel);
                         }
                     });
                 }

                 private static void initFX(JFXPanel fxPanel) {
                     Scene scene = createScene();
                     fxPanel.setScene(scene);
                 }

                 private static Scene createScene() {
                     StackPane p = new StackPane();
          Scene scene = new Scene(p);
                     p.getChildren().add(new Button("fx button"));
                     return scene;
        }

                 public static void main(String[] args) {
                     SwingUtilities.invokeLater(new Runnable() {
                         @Override
                         public void run() {
                             initAndShowGUI();
                         }
                     });
                 }
        }

              Assignee:
              Anton Tarasov (Inactive)
              Reporter:
              Anton Tarasov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: