import java.awt.event.*; import javafx.application.*; import javafx.embed.swing.*; import javafx.scene.*; import javafx.event.*; import javafx.scene.layout.*; import javafx.stage.*; import javax.swing.*; import javafx.scene.control.*; public class test extends Application { @Override public void start(final Stage stage) throws Exception { Pane pane = new StackPane(); Scene scene = new Scene(pane, 200, 200); final SwingNode swingNode = new SwingNode(); init(swingNode); pane.getChildren().addAll(swingNode); stage.setScene(scene); stage.show(); } private void init(final SwingNode node) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { JPanel panel = new JPanel(); panel.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { System.err.println(e); } }); JComboBox component = new JComboBox<>(); for (int i = 0; i < 10; ++i) { component.addItem("Item " + i); } component.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { System.out.println(e); } }); panel.add(component); node.setContent(panel); JFrame f = new JFrame("Swing test"); f.setSize(200, 200); JFXPanel p = new JFXPanel(); f.add(p); f.setVisible(true); Platform.runLater(() -> { Pane pane = new StackPane(); Scene scene = new Scene(pane, 200, 200); Button b = new Button("FX button"); b.setOnMousePressed(e -> System.err.println(e)); pane.getChildren().addAll(b); p.setScene(scene); }); } }); } }