!7 import javafx.application.Platform; import javafx.embed.swing.JFXPanel; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.scene.text.Text; module JavaFXTest > DynModule { visualize { final new JFXPanel fxPanel; jfxLater(r { fxPanel.setScene(createScene()); }); ret fxPanel; } } // JavaFX World static Scene createScene() { new Group root; Scene scene = new Scene(root, Color.ALICEBLUE); new Text text; text.setX(40); text.setY(100); text.setFont(new Font(25)); text.setText("Welcome JavaFX!"); root.getChildren().add(text); ret scene; }