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