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

前端 未结 6 599
名媛妹妹
名媛妹妹 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:15

    To add any kind of supported image to your project, just right click on 'src' folder of your project and New... Package... and under Name give, for example, 'resources'. After that you only need to copy your images there. When you export the project to a runable JAR, all resources go together and Runs fine.

提交回复
热议问题