1

I worked through the fabulous tutorial here: http://code.makery.ch/java/javafx-8-tutorial-part7/

I had some success in that the main application icon displays when installing, and is used for the installed application, however I have two images which seem to be left unchanged.

When the .dmg is mounted, there is an image which shows on the desktop, and another next to the application name in the title bar, both of these are still defaulting to the Java icon.

Have included screen shots to show where the correct icon shows in the installer window, but the default java one is used in the title bar of that window and in the app on the desktop.

Do I need to add new/differently named images somewhere else in the project? Or is there something additional I can put in my build.xml to ensure these images change too?

Any help would be greatly appreciated. Cheers :)

enter image description here

enter image description here

4

2 回答 2

2

您是否也在代码中设置了舞台的图标?

        Image icon16 = new Image(getClass().getResource("logo_16x16.png").toExternalForm());
        Image icon32 = new Image(getClass().getResource("logo_32x32.png").toExternalForm());
        Image icon64 = new Image(getClass().getResource("logo_64x64.png").toExternalForm());
        Image icon128 = new Image(getClass().getResource("logo_128x128.png").toExternalForm());
        assert icon16 != null && icon32 != null && icon64 != null && icon128 != null;
        primaryStage.getIcons().addAll(icon16, icon32, icon64, icon128);
于 2015-03-02T19:27:37.343 回答
2

哦,是的,所有排序!:)

我以详细模式运行 build.xml:添加verbose="true"fx:deploy标签

控制台输出现在详细说明正在使用哪些资源,以及在何处添加您自己的资源以进行自定义。

对于上述问题,该行是:

Using default package resource [volume icon] (add package/macosx/AddressApp-volume.icns to the class path to customize)

将 AddressApp-volume.icns 文件添加到建议的位置,并且到处都是BAM漂亮的图标!!:D

于 2015-03-04T02:59:45.183 回答