JavaFX background-image works in scenebuilder and win but not on osx

泪湿孤枕 提交于 2019-12-13 00:42:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!