在OSX上缺少应用程序图标

时间:2014-08-14 21:28:05

标签: java javafx dmg

我的应用程序包含徽标,其中一个按钮也分配了徽标。我使用build.fxbuild创建build.xml,然后构建我的安装程序。

在Windows系统上从构建的EXE运行应用程序没问题。

但是,如果我从OSX机器构建DMG,则缺少应用程序和按钮徽标。如果我在Eclipse中运行应用程序(在OSX上),它们是可见的。

应用程序徽标(在主类中)

Image ico = new Image("file:resources/images/logo.png");
this.primaryStage.getIcons().add(ico);

按钮(在fxml文件中)

<Button fx:id="testButton" layoutX="100.0" layoutY="150.0" mnemonicParsing="false" onAction="#testMethod" prefHeight="23.0" prefWidth="174.0" style="-fx-graphic: url('file:resources/images/test.png')" text="Test" />

我在这里缺少什么?

0 个答案:

没有答案
相关问题