***
JavaFX SDK provides the [`JFXPanel`](https://docs.oracle.com/javase/8/javafx/api/javafx/embed/swing/JFXPanel.html) class, which is located in the `javafx.embed.swing` package and enables you to embed JavaFX content into Swing applications.
- *JFXPanel* is a Swing *JComponent*.
- *JFXPanel* contains a JavaFX *Scene*.
Dependency _javafx-swing_ must be added.
```xml
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>17.0.2</version>
</dependency>
```
```java
var jfxPanel = new JFXPanel();
Platform.runLater(() -> {
var button = new Button("JavaFX: Click me");
button.setOnAction(e -> System.out.println("Hello from JavaFX!"));
var root = new VBox(button);
var scene = new Scene(root);
jfxPanel.setScene(scene);
});
swingPanel.add(jfxPanel, BorderLayout.CENTER);
```
***
**References**:
- [Integrating JavaFX into Swing Applications](https://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm#CHDIEEJE)
- [Building and Deploying Java Client Desktop Applications with JDK 17 and Beyond](https://www.youtube.com/watch?v=jb7m9dL1iSI&list=WL&index=180&t=430s)