code: private TableCellRenderer getCellRenderer(Class<?> type) {
          // try to create one from the factory
          TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(type);
  
          // if that fails, recursively try again with the superclass
          if (renderer == null && type != null) {
              renderer = getCellRenderer(type.getSuperclass());
          }
  
          // if that fails, just use the default Object renderer
          if (renderer == null) {
              renderer = super.getDefaultRenderer(Object.class);
          }
  
          return renderer;
      }
docs: Helper method to lookup a cell renderer based on type.
  
  @param type the type for which a renderer should be found
  @return a renderer for the given object type