Essentially, what I want is to create a Button
with a cropped graphic. Cropped in the sense of, the Image
is in the back, and the Button
is a hole, showing the Graphic
. As of now, it looks like
However I want the graphic to fit the button, even if its bigger, to just get cut off. My current code is along the lines of
Image image = new Image(Main.class.getResource("/texture.png").toExternalForm());
yesButton.setGraphic(new ImageView(image));