问题
I have a simple FXML which has a background-image defined for a tab-pane in an external css-file.
The background-images is located in a image-directory which is placed in the same folder as in the .FXML
The problem is that this background-image is being displayed in SceneBuilder (Win 7 and OSX Mountain Lion) but when running the application, only on Windows 7.
I'm using Netbeans 7.2 and also tried updating to JDK 7.0_06 on OSX. I also made sure that my project is being build with 7.0_06.
#mainNavigation .tab-content-area,
#mainNavigation .tab {
-fx-background-color: #dddddd;
-fx-background-image: url('./img/tabpaneBG.png');
}
What else might I try?
来源:https://stackoverflow.com/questions/11995958/javafx-background-image-works-in-scenebuilder-and-win-but-not-on-osx