How To Add An Icon On Custom Perspective Module

Hi Guys,

I just wondering on how to add icon on my custom perspective icon in the code. Assuming i already have created an icon and ready to used in the project, where to keep that icon inside my code folders.

Have a look a the ComponentDescriptor where you set the module properties. I got the icon working using the below line with the images stored in the resource folder, I think this was also in the example component from IA

.setName("Image")
.setIcon(new ImageIcon(PerspectiveComponentsModule.class.getResource("/components/image/icons/image.png")))
2 Likes

Thanks for your response. It works.

1 Like