Optimizing images in a jar-file

Is there an advantages to putting all my small widget graphics in one single png-file, which is loaded once, and then creating ImageIcons for buttons and such from sections of this? (Normally I would just use new ImageIcon(aClass.class.getResource("/path/with/image.png")).) What would be a good way of doing this?

13.10.2009 17:10:00
1 ОТВЕТ
РЕШЕНИЕ

This technique is mostly used for small graphics used on a website where it is expensive to load a lot of resources seperatly.

In your case I would see no benefit in using this technique.

1
13.10.2009 17:29:11