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

前端 未结 6 608
名媛妹妹
名媛妹妹 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条回答
  •  旧时难觅i
    2021-02-07 10:12

    In Eclipse Juno 4.2. the Image chooser often doesn't show the resource folder (e.g. from a Maven-structured project: src/main/resources. Presumably that is a bug.

    If you remove and then add the resource folder explicitly with the include option in the Java Build Path Window (Source Tab), it will pop up. Even after removing the "include" option and setting it back to "All", it will still show.

    Of course, you may remove and add directly from the context menu, when right-clicking the src/main/resources folder.

提交回复
热议问题