private void paintClose(Graphics2D g,JComponent c,int width,int height,ButtonColors colors){
  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  Shape s=decodeInterior(width,height);
  g.setPaint(decodeCloseGradient(s,colors.interiorTop,colors.interiorBottom));
  g.fill(s);
  s=decodeEdge(width,height);
  g.setColor(colors.edge);
  g.draw(s);
  s=decodeShadow(width,height);
  g.setColor(colors.shadow);
  g.draw(s);
  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);
  g.setColor(colors.top);
  g.drawLine(0,0,width - 2,0);
  g.setColor(colors.left);
  g.drawLine(0,1,0,height - 3);
  s=decodeMarkInterior(width,height);
  g.setColor(colors.markInterior);
  g.fill(s);
  s=decodeMarkBorder(width,height);
  g.setColor(colors.markBorder);
  g.draw(s);
}

private void paintClose ( Graphics2D g , JComponent c , int width , int height , ButtonColors colors ) { g . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; Shape s = decodeInterior ( width , height ) ; g . setPaint ( decodeCloseGradient ( s , colors . interiorTop , colors . interiorBottom ) ) ; g . fill ( s ) ; s = decodeEdge ( width , height ) ; g . setColor ( colors . edge ) ; g . draw ( s ) ; s = decodeShadow ( width , height ) ; g . setColor ( colors . shadow ) ; g . draw ( s ) ; g . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_OFF ) ; g . setColor ( colors . top ) ; g . drawLine ( 0 , 0 , width - 2 , 0 ) ; g . setColor ( colors . left ) ; g . drawLine ( 0 , 1 , 0 , height - 3 ) ; s = decodeMarkInterior ( width , height ) ; g . setColor ( colors . markInterior ) ; g . fill ( s ) ; s = decodeMarkBorder ( width , height ) ; g . setColor ( colors . markBorder ) ; g . draw ( s ) ; }
paint the background of the button using the specified colors .
