Skip to content

Instantly share code, notes, and snippets.

@KPCCoiL
Created December 28, 2015 12:44
Show Gist options
  • Save KPCCoiL/03a3cef33ddcc6a10b03 to your computer and use it in GitHub Desktop.
Save KPCCoiL/03a3cef33ddcc6a10b03 to your computer and use it in GitHub Desktop.
(module-compile-options main: #t)
(module-extends javafx.application.Application)
(import (class javafx.stage Stage)
(class javafx.scene Scene)
(class javafx.scene.layout StackPane)
(class javafx.scene.control Button)
(class javafx.application Application))
(define (start (stage :: Stage))
(let* ((btn (Button
text: "Say 'Hello World'"
onAction: (lambda (e) (display "Hello, World!\n"))))
(root (StackPane btn))
(scene (Scene root 300 250)))
(set! stage:scene scene)
(set! stage:title "JavaFX in Kawa")
(stage:show)))
(Application:launch Hello (String[] (command-line)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment