+ if (icons == null)
+ {
+ icons = new HashMap<String, ImageIcon>();
+ }
+ if (!icons.containsKey(filePath))
+ {
+ ImageIcon icon = null;
+ URL imgURL = JalviewFileView.class.getResource(filePath);
+ if (imgURL != null)
+ {
+ icon = new ImageIcon(imgURL);
+ }
+ else
+ {
+ System.err
+ .println("JalviewFileView.createImageIcon: Couldn't find file: "
+ + filePath);
+ }
+ icons.put(filePath, icon);
+ }