Skip to content

Instantly share code, notes, and snippets.

@marsdevapps
Created March 6, 2017 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marsdevapps/54779309e66121b17b5b85e163ba3778 to your computer and use it in GitHub Desktop.
Save marsdevapps/54779309e66121b17b5b85e163ba3778 to your computer and use it in GitHub Desktop.
TornadoFX Sample
class Sample01TornadoFXApp : App(Sample01View::class)
class Sample01View : View("Sample 01 TornadoFX") {
    override val root = borderpane {
        prefWidth = 400.0
        prefHeight = 200.0
        center {
            button("Click Me") {
                setOnAction {
                   alert(Alert.AlertType.INFORMATION, "Sample 01 TornadoFX", "Button Clicked", ButtonType.OK)
                }
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment