2023-05-07 16:52:51 -06:00
|
|
|
/*
|
|
|
|
* 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;
|
2023-05-13 13:14:00 -06:00
|
|
|
import javafx.scene.image.Image
|
2023-05-07 16:52:51 -06:00
|
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
|
|
class App : Application() {
|
|
|
|
|
|
|
|
override fun start(stage: Stage) {
|
2023-05-09 21:59:26 -06:00
|
|
|
var scene = Scene(loadFXML("primary"), 963.0, 713.0)
|
2023-05-13 13:14:00 -06:00
|
|
|
stage.icons.add(Image(this.javaClass.getResourceAsStream("app-256x256.png")))
|
2023-05-13 15:19:18 -06:00
|
|
|
stage.setResizable(false)
|
2023-05-07 16:52:51 -06:00
|
|
|
stage.title = "Server For Dummies"
|
|
|
|
stage.scene = scene
|
|
|
|
stage.show()
|
|
|
|
}
|
|
|
|
|
2023-05-09 16:31:47 -06:00
|
|
|
public fun loadFXML(fxml: String) : Parent {
|
2023-05-07 16:52:51 -06:00
|
|
|
val fxmlLoader = FXMLLoader(this.javaClass.getResource(fxml + ".fxml"))
|
|
|
|
return fxmlLoader.load()
|
|
|
|
}
|
|
|
|
|
|
|
|
public fun run() {
|
|
|
|
launch()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|