Files
openide/plugins/javaFX/resources/fileTemplates/j2ee/javafx-HelloApplication-kotlin.kt.ft
Yuriy Artamonov 836bff08bd IDEA-268767 New JavaFX project wizard
GitOrigin-RevId: 122ff5370e645d129f777f4319cbe32780675f57
2021-05-12 21:27:23 +00:00

20 lines
545 B
Plaintext

package ${context.rootPackage}
import javafx.application.Application
import javafx.fxml.FXMLLoader
import javafx.scene.Scene
import javafx.stage.Stage
class HelloApplication : Application() {
override fun start(stage: Stage) {
val fxmlLoader = FXMLLoader(HelloApplication::class.java.getResource("hello-view.fxml"))
val scene = Scene(fxmlLoader.load(), 320.0, 240.0)
stage.title = "Hello!"
stage.scene = scene
stage.show()
}
}
fun main() {
Application.launch(HelloApplication::class.java)
}