if (icon != null)
  protected void paintIcon(Graphics g, int tabPlacement, int tabIndex,                           Icon icon, Rectangle iconRect, boolean isSelected)  {    icon.paintIcon(tabPane, g, iconRect.x, iconRect.y);  }