Documentation

Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

Getting Started with Swing Kit

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

1. Requirements

You need the following to use Swing Kit:

  • a Vaadin Flow application, using Vaadin 23 or newer;

  • a Swing application running with Java 8 or newer;

  • a Maven build system.

2. Maven Setup

  1. 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>
  2. 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>

3. 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
Access to the system home folder is required
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.