Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8058870

Mac: JFXPanel deadlocks in jnlp mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 9
    • 8u40
    • client-libs
    • MacOS 10.8

    • b36
    • os_x

    Backports

      Description

        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();
                         }
                     });
                 }
        }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: