After compiling this code, I'm getting these error...
# tornadofx
o
After compiling this code, I'm getting these errors:
Copy code
import tornadofx.*
import tornadofx.Stylesheet.Companion.button
import tornadofx.Stylesheet.Companion.label

class MyView: View() {
    override val root = vbox {
        button("Press me")
        label("Waiting")
    }
}
class MyApp: App(MyView::class)
fun main(args: Array<String>) {
    launch<MyApp>(args)
}
Copy code
Error:Kotlin: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class tornadofx.UIComponent, unresolved supertypes: javafx.event.EventTarget
    class <http://tornadofx.App|tornadofx.App>, unresolved supertypes: javafx.application.Application
Copy code
Error:(8, 25) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public fun EventTarget.vbox(spacing: Number? = ..., alignment: Pos? = ..., op: VBox.() -> Unit = ...): VBox defined in tornadofx
Error:(7, 15) Kotlin: Cannot access class 'javafx.scene.Node'. Check your module classpath for missing or conflicting dependencies
Copy code
Error:(9, 9) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public fun EventTarget.button(text: ObservableValue<String>, graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
public fun EventTarget.button(text: String = ..., graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
public fun ButtonBar.button(text: ObservableValue<String>, type: ButtonBar.ButtonData? = ..., graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
public fun ButtonBar.button(text: String = ..., type: ButtonBar.ButtonData? = ..., graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
public fun ToolBar.button(text: ObservableValue<String>, graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
public fun ToolBar.button(text: String = ..., graphic: Node? = ..., op: Button.() -> Unit = ...): Button defined in tornadofx
Copy code
Error:(10, 9) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public inline fun <reified T> EventTarget.label(observable: ObservableValue<???>, graphicProperty: ObjectProperty<Node>? = ..., converter: StringConverter<in ???>? = ..., noinline op: Label.() -> Unit = ...): Label defined in tornadofx
public fun EventTarget.label(text: String = ..., graphic: Node? = ..., op: Label.() -> Unit = ...): Label defined in tornadofx
Error:(18, 12) Kotlin: Type argument is not within its bounds: should be subtype of 'Application'
This is from following the examples
my gradle script is this:
Copy code
apply plugin: 'kotlin'
apply plugin: 'application'

buildscript {
    ext.kotlin_version = '1.2.71'
    ext.tornadoFx_version = '1.7.17'
    
    ext.jarDir = rootProject.buildDir.path + '/libs'

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    compile "no.tornado:tornadofx:$tornadoFx_version"
}

group 'com.github.otakusenpai.dbmsLab'
version '1.0-SNAPSHOT'

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

task fatJar(type: Jar) {
    archiveName = rootProject.name + "-" + version + ".jar"
    manifest {
        attributes 'Main-Class': 'com.github.otakusenpai.dbmsLab.MainKt'
    }
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}

task assembleJar(type: Copy) {
    from fatJar
    into jarDir
}

build.dependsOn assembleJar
a
Which JDK version are you using?