To use Swing Kit, you need a Vaadin Flow application, using Vaadin 23 or later. You also need a Swing application running with Java 8 or later, as well as a Maven build system.
Add the following dependency to your Vaadin Flow application:
<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-swing-kit-flow</artifactId> <version>1.0.0</version> </dependency>
Add the following dependency to your Swing application:
<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-swing-kit-client</artifactId> <version>1.0.0</version> </dependency>
On macOS and Linux, the following JVM parameters must be added to run the Swing application:
--add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.lwawt=ALL-UNNAMED --add-opens java.desktop/sun.lwawt.macosx=ALL-UNNAMED
Need Access to System Home FolderThe rendering process stores a file in the home folder of the system, which is downloaded from the internet, if not already present. This happens the first time you run the Swing application.