The following should work but throws a ClassCastException because CSS is trying to set the fill to a String. This did work at some point in time. Apparently, there is no unit test for it.
@Override public void start(Stage stage) throws Exception {
Rectangle rect = new Rectangle(50,50);
rect.setStyle("-fx-fill: url('https://duke.kenai.com/wave/Wave.png');");
VBox vbox = new VBox();
vbox.getChildren().add(rect);
stage.setScene(new Scene(vbox));
stage.show();
}
I ran this against both 7u60 and 8u20. Both throw the CCE.
@Override public void start(Stage stage) throws Exception {
Rectangle rect = new Rectangle(50,50);
rect.setStyle("-fx-fill: url('https://duke.kenai.com/wave/Wave.png');");
VBox vbox = new VBox();
vbox.getChildren().add(rect);
stage.setScene(new Scene(vbox));
stage.show();
}
I ran this against both 7u60 and 8u20. Both throw the CCE.