Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Setting images in the Eclipse view(Swing components)

Title: Setting images in the Eclipse view(Swing components)

Hi all ,
   I have created a view in Eclipse. That uses a JTree(Swing) and  Toolbar  menu(Swing JButton component used) embedded inside swt composite. I am trying to set images to the toolbar buttons and the tree node. The images are included under /icons directory in the same directory where the class file exists.The code I used is

        Button.setIcon(new ImageIcon("/icons/toolbarimages/forward.gif"));
The path is correct but I am unable to load the image. The images are not visible.

I tried giving the path from the plugin root and placing the icons folder under the plugin directory as below.

        Button.setIcon(new ImageIcon("platform:/plugin/'PluginName'/images/toolbarimages/forward.gif"));

I am still unable to load the images . Can anybody please help.

Thank You and Best Regards,
Rashmi H.Ramachandra


Back to the top