How do I add an icon as a classpath resource to an SWT window created with WindowBuilder?

前端 未结 6 596
名媛妹妹
名媛妹妹 2021-02-07 09:48

I\'m trying to add an external icon from an *.ico file to a window that I\'m creating using the WindowBuilder design window. I can select the shell, which brings up an \"image\"

6条回答
  •  孤独总比滥情好
    2021-02-07 10:12

    In my case, WindowBuilder recognized the *.ico format but didn't replace the default Java icon with my custom icon. It was only when I converted the *.ico to *.png (through this handy online tool) that WindowBuilder finally changed the default Java icon to my custom "icon", even though it's really a PNG. I expected WindowBuilder to be able to recognize the ICO format.

提交回复
热议问题