Let's see step-by-step how to create a JavaFX application that uses Charts-kt.

This tutorial will help you understand how to:

  1. Set up a Kotlin JavaFX project
  2. Import the libraries you need using your licence keys
  3. Create your first chart in a JavaFX application and launch it

What do you need?

Creating the Kotlin JavaFX project

IntelliJ IDEA is the editor of choice for a Kotlin project. This tutorial works with the community (free) edition of IDEA as well as the ultimate edition.

Let's start by creating a new Kotlin project, and choose JVM Application.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/be98b800-a78b-4d3c-a9b2-06fadcb3bb6c/Untitled.png

Choose the name and location of your project.

As for the build system, Gradle is the preferred option but Maven also works.

We'll choose Gradle Kotlin for this tutorial, you can change it if you're more comfortable with Groovy.

Choosing the JDK

Concerning the JDK, you can either run the project with: