public void initResources() {
		final Class clazz = PaintExample.class;
		if (resourceBundle != null) {
			try {
				for (int i = 0; i < tools.length; ++i) {
					Tool tool = tools[i];
					String id = tool.group + '.' + tool.name;
					InputStream sourceStream = clazz.getResourceAsStream(getResourceString(id + ".image"));
					ImageData source = new ImageData(sourceStream);
					ImageData mask = source.getTransparencyMask();
					tool.image = new Image(null, source, mask);
					try {
						sourceStream.close();
					} catch (IOException e) {
						e.printStackTrace();
					}
				}
				return;
			} catch (Throwable t) {
			}
		}
		String error = (resourceBundle != null) ?
			getResourceString("error.CouldNotLoadResources") :
			"Unable to load resources";
		freeResources();
		throw new RuntimeException(error);
	}