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

Mac: JFXPanel deadlocks in jnlp mode

    XMLWordPrintable

    Details

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

      MacOS 10.8

    • Subcomponent:
    • Resolved In Build:
      b36
    • OS:
      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

                Assignee:
                ant Anton Tarasov
                Reporter:
                ant Anton Tarasov
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: