Created
February 5, 2019 17:49
-
-
Save bjonnh/49f04f73cae9380ad52583317efa2059 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.nprod.mnwe | |
import javafx.scene.input.KeyCombination | |
import tornadofx.* | |
class MainView: View() { | |
override val root = tabpane { | |
tab("1") { | |
button("Click me") { | |
shortcut(KeyCombination.valueOf("F12")) | |
action { | |
println("I was clicked for 1") | |
} | |
} | |
} | |
tab("2") { | |
button("Click me") { | |
shortcut(KeyCombination.valueOf("F12")) | |
action { | |
println("I was clicked for 2") | |
} | |
} | |
} | |
} | |
} | |
class MyApp : App( | |
MainView::class) | |
fun main(args: Array<String>) { | |
launch<MyApp>(args) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment