I'm vey new to both CSS and JavaFX but as far as I'm concerned this should work.
In my Java file i have the following code for the HBox method:
public HBox otherBtns(){
HBox hbox1 = new HBox();
hbox1.setPadding(new Insets(10, 12, 15, 12));
hbox1.setSpacing(12);
hbox1.setId("hbox1");
hbox1.getChildren().addAll(btnEmbark, btnDisEmbark);
return hbox1;
}
In my css file i use hbox1
#hbox1{
-fx-background-image: url("http://www.vectorgraphit.com/wp-content/uploads/2014/04/trianglify-background-6.jpg");
}
The rest of my css works fine except i can't seem to attach this background to the HBox.
I'm getting the following error:
com.sun.javafx.css.converters.URLConverter resolve
WARNING: unknown protocol: c