private void paintBackground(Graphics2D g,JComponent c,int width,int height,ButtonColors colors){
  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);
  g.setColor(colors.edge);
  g.drawLine(width - 1,0,width - 1,height - 2);
  g.drawLine(0,height - 2,width - 2,height - 2);
  g.setColor(colors.shadow);
  g.drawLine(0,height - 1,width - 1,height - 1);
  g.setColor(colors.interior);
  g.fillRect(1,1,width - 1,height - 2);
}

private void paintBackground ( Graphics2D g , JComponent c , int width , int height , ButtonColors colors ) { 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 ) ; g . setColor ( colors . edge ) ; g . drawLine ( width - 1 , 0 , width - 1 , height - 2 ) ; g . drawLine ( 0 , height - 2 , width - 2 , height - 2 ) ; g . setColor ( colors . shadow ) ; g . drawLine ( 0 , height - 1 , width - 1 , height - 1 ) ; g . setColor ( colors . interior ) ; g . fillRect ( 1 , 1 , width - 1 , height - 2 ) ; }
paint the background of the button using the specified colors .
