FULL PRODUCT VERSION : java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) ADDITIONAL OS VERSION INFORMATION : OSX 10.12 Sierra A DESCRIPTION OF THE PROBLEM : In a mixed JavaFx Swing Application with java version "1.8.0_131", JComboBox doesn't display popup (see example code). This happens only on Apple OSX 10.12 Sierra. The program works well on Windows 10 and Linux Debian. REGRESSION. Last worked in version 8u121 ADDITIONAL REGRESSION INFORMATION: java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Start this and try to select the JComboBox The popup doesn't appear public class TestGuiSwing extends Application{ @Override public void start(Stage primaryStage) throws Exception { final SwingNode swingNode = new SwingNode(); createSwingContent(swingNode); Pane pane = new Pane(); pane.getChildren().add(swingNode); primaryStage.setTitle("Swing in JavaFX"); primaryStage.setScene(new Scene(pane, 500, 500)); primaryStage.show(); } private void createSwingContent(final SwingNode swingNode) { SwingUtilities.invokeLater(() -> { JComboBox<String> cb = new JComboBox<String>(); cb.addItem("item 1"); cb.addItem("item 2"); cb.addItem("item 3"); cb.addItem("item 4"); JPanel jPanel = new JPanel(); jPanel.add(cb); swingNode.setContent(jPanel); }); } } EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - If you select the JComboBox the popup appears ACTUAL - If you select the JComboBox the popup doesn't appear ERROR MESSAGES/STACK TRACES THAT OCCUR : No error REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public class TestGuiSwing extends Application{ @Override public void start(Stage primaryStage) throws Exception { final SwingNode swingNode = new SwingNode(); createSwingContent(swingNode); Pane pane = new Pane(); pane.getChildren().add(swingNode); primaryStage.setTitle("Swing in JavaFX"); primaryStage.setScene(new Scene(pane, 500, 500)); primaryStage.show(); } private void createSwingContent(final SwingNode swingNode) { SwingUtilities.invokeLater(() -> { JComboBox<String> cb = new JComboBox<String>(); cb.addItem("item 1"); cb.addItem("item 2"); cb.addItem("item 3"); cb.addItem("item 4"); JPanel jPanel = new JPanel(); jPanel.add(cb); swingNode.setContent(jPanel); }); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : no workaround
|