[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] To dispose images

Hello all,
We have an SWT application which has around 50 rows holding swt widgets like image textbox and toolbar (With four images).


Depending on the status model object need update the image and toolbar items(Images).It is working fine but if more rows are added try to update the state it throws below specified exception
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.eclipse.swt.graphics.ImageData.convertPad(ImageData.java:1649)
at org.eclipse.swt.graphics.Image.getImageData(Image.java:1317)
at org.eclipse.swt.graphics.Image.<init>(Image.java:264)
at org.eclipse.swt.widgets.ToolItem.updateImages(ToolItem.java:894)
at org.eclipse.swt.widgets.ToolItem.setImage(ToolItem.java:670)


Can i know what is the best way to update the images dynamically and to dispose the image update the new image.

Regards
BG