javafx – TornadoFX filechooser
•
Java
I'm looking for a solution for JavaFX filechooser (in kotlin) I insist on this. I can't pass root view because window! Yes, expect:
button("open some file") { setOnAction { val fileChooser = FileChooser(); val file = fileChooser.showOpenDialog(???) ... } }
What should I pass in this case?
Solution
According to the docs, you can pass a null for the window
However, since you are using tornadofx, you may only want to use the choosefile and choosedirectory functions it provides They provide you with useful defaults, but (because they are only defaults), you can easily override them to customize the functionality according to your needs
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码