IDEA Project Configuration

Enable Auto Import in IntelliJ

You can configure IntelliJ to resolve imports automatically for Java classes. This makes it easier to copy code from this tutorial into your IDE.

To enable auto import in IntelliJ, open the Preferences/Settings window and navigate to Editor → General → Auto Import.

From there, you can enable the following two options: Add unambiguous imports on the fly; and Optimize imports on the fly. You can see the checkboxes for these choices in the screenshot here:

automatic import settings

Vaadin shares many class names (e.g., Button) with Swing, Java Abstract Window Toolkit (AWT), and JavaFX.

If you don’t use Swing, AWT, or JavaFX in other projects, add the following packages to the Exclude from import and completion list to help IntelliJ select the correct classes, automatically:

  • com.sun

  • java.awt

  • javafx.scene

  • javax.swing

  • jdk.internal

  • sun.plugin

Now that you have a working development environment, you’re ready to start building a web application.

Last updated

Was this helpful?