import javafx.application.Application
import javafx.beans.property.SimpleObjectProperty
import javafx.geometry.Pos
import javafx.scene.image.Image
import javafx.stage.FileChooser
import tornadofx.*
import java.io.File
fun main()= Application.launch(MytestApp::class.java)
class MytestApp:App(Mytest::class)
class Mytest : View("Mytest") {
val bigImage= SimpleObjectProperty()
override val root = borderpane {
prefWidth=500.0
prefHeight=500.0
paddingAll=10
top = hbox(10) {
button("选择图片") {
action {
// initView()
val imgType = listOf("*.jpg"