Docs

Documentation versions (currently viewingVaadin 24)

Getting Started with Swing Kit

Learn how to set up your Vaadin and Swing projects to be able to use Swing Kit.

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.

Maven Setup

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>

Swing Application Configuration

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
Note
Need Access to System Home Folder
The 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.