O'Reilly logo

Introduction to JVM Languages by Vincent van der Leun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a runnable application

From src/main/kotlin, open App.kt. Replace its content with the following:

    package javafxdemo    fun main(args: Array<String>) {    }

Place the cursor after the package statement and add a new blank line. Type the following:

    class KotlinJavaFXDemo :

Type Appl and press Ctrl + Space bar (cmd + Space bar on Apple machines); the Eclipse IDE will show a popup window with suggestions:

Find the Application class from the javafx.application package in the list and double-click it or press Enter. An import statement will be added and the Application class name will be written for you. Now add () , so that our subclass ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required