code: public static ImageIcon getDescriptorIcon(final ComponentDescriptor<?> descriptor, final int newWidth,
              final boolean allowTransparentForUnspecific) {
          if (descriptor instanceof HasIcon) {
              final ImageIcon imageIcon = getIconFromData(descriptor, newWidth);
  
              if (imageIcon != null) {
                  return imageIcon;
              }
          }
  
          final ClassLoader classLoader = descriptor.getComponentClass().getClassLoader();
          final boolean allowGeneric = !allowTransparentForUnspecific;
          final String imagePath = getDescriptorImagePath(descriptor, classLoader, allowGeneric);
          if (imagePath == null) {
              return getTransparentIcon(newWidth);
          }
          return _imageManager.getImageIcon(imagePath, newWidth, classLoader);
      }
docs: Gets the icon of a component based on it's {@link ComponentDescriptor}.
  
  @param descriptor
  @param newWidth
  @param allowTransparentForUnspecific whether or not to use a transparent icon in case only a generic icon could
  be found. This is useful for menu items where the icon is not a requirement.
  @return