Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting the Background Image of a GridPane (-fx-background-image does nothing)

newtsporkJun 23 2013 — edited Jul 2 2013

How can I set the background image of a GridPane? I tried using CSS -fx-background-image: url('background.jpg'); however that does nothing for me. Setting the background color still works, so I am not failing to properly reference the GridPane, and when I use that same line on other controls, the image appears, so I am referencing the image correctly, too.

EDIT: I feel I should also note that in the CSS Reference Guide it says that a GridPane should have -fx-background-image since GridPane has Pane and Pane has Region, which has -fx-background-image.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2013
Added on Jun 23 2013
1 comment
2,980 views