From 47de8220d52dde525d107ee076d090a48ee02c2e Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 7 May 2023 16:52:51 -0600 Subject: might as well commit before I go further --- .../kotlin/xyz/brysonsteck/serverfordummies/App.kt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt (limited to 'app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt') diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt new file mode 100644 index 0000000..0547a8f --- /dev/null +++ b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt @@ -0,0 +1,30 @@ +/* + * This Kotlin source file was generated by the Gradle 'init' task. + */ +package xyz.brysonsteck.serverfordummies + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +class App : Application() { + + override fun start(stage: Stage) { + var scene = Scene(loadFXML("primary"), 1500.0, 900.0) + stage.title = "Server For Dummies" + stage.scene = scene + stage.show() + } + + private fun loadFXML(fxml: String) : Parent { + val fxmlLoader = FXMLLoader(this.javaClass.getResource(fxml + ".fxml")) + return fxmlLoader.load() + } + + public fun run() { + launch() + } + +} -- cgit v1.2.3