Image icon = new Image(new File("path/icon.png").toURI().toString(), width, hight, false, false); button1.setGraphic(new ImageView(icon));