Fetch an ImageIcon relative to the calling location. @param fileName String, the path to the IconImage source @return ImageIcon, the icon or null on failure
(String fileName)
| 77 | * on failure |
| 78 | */ |
| 79 | private static ImageIcon createImageIcon(String fileName) |
| 80 | { |
| 81 | fileName = RESOURCE_URL + fileName; |
| 82 | final URL iconURL = Icons.class.getResource(fileName); |
| 83 | if (iconURL == null) |
| 84 | { |
| 85 | return null; |
| 86 | } |
| 87 | return new ImageIcon(iconURL); |
| 88 | } |
| 89 | |
| 90 | public ImageIcon getImageIcon() |
| 91 | { |