if (b.isContentAreaFilled() && (UIManager.get(getPropertyPrefix() + "gradient") != null) && b.isEnabled() && (b.getBackground() instanceof UIResource)) updateWidthGradient(g, b, b.getParent()); else super.update(g, c); }
if ((b.getBackground() instanceof UIResource) && b.isContentAreaFilled() && b.isEnabled()) { ButtonModel m = b.getModel(); String uiKey = "Button.gradient"; if (! isToolbarButton(b)) { if (! m.isArmed() && ! m.isPressed() && isDrawingGradient(uiKey)) { MetalUtils.paintGradient(g, 0, 0, b.getWidth(), b.getHeight(), SwingConstants.VERTICAL, uiKey); paint(g, c); return; } } else if (m.isRollover() && isDrawingGradient(uiKey)) { MetalUtils.paintGradient(g, 0, 0, b.getWidth(), b.getHeight(), SwingConstants.VERTICAL, uiKey); paint(g, c); return; } }  super.update(g, c); }
  public void update(Graphics g, JComponent c)  {    AbstractButton b = (AbstractButton) c;    if (b.isContentAreaFilled()        && (UIManager.get(getPropertyPrefix() + "gradient") != null)        && b.isEnabled()        && (b.getBackground() instanceof UIResource))      updateWidthGradient(g, b, b.getParent());    else      super.update(g, c);  }