public void paintBorder(Component c,Graphics g,int x,int y,int width,int height){
  if (noBorder) {
    return;
  }
  if (!iconsLoaded) {
    super.paintBorder(c,g,x,y,width,height);
    return;
  }
  g.translate(x,y);
  if (tlCorner.getImageLoadStatus() == MediaTracker.COMPLETE) {
    paintCorner(c,g,0,0,tlCorner);
  }
  if (blCorner.getImageLoadStatus() == MediaTracker.COMPLETE) {
    paintCorner(c,g,0,height - blCorner.getIconHeight(),blCorner);
  }
  if (trCorner.getImageLoadStatus() == MediaTracker.COMPLETE) {
    paintCorner(c,g,width - trCorner.getIconWidth(),0,trCorner);
  }
  if (brCorner.getImageLoadStatus() == MediaTracker.COMPLETE) {
    paintCorner(c,g,width - brCorner.getIconWidth(),height - brCorner.getIconHeight(),brCorner);
  }
  int edgeWidth=width - (insets.left + insets.right);
  int edgeHeight=height - (insets.top + insets.bottom);
  paintEdge(c,g,topLine,insets.left,0,edgeWidth,insets.top,false,topShouldTile,topNumTiledIcons,topStaticSpace);
  paintEdge(c,g,bottomLine,insets.left,height - insets.bottom,edgeWidth,insets.bottom,false,bottomShouldTile,bottomNumTiledIcons,bottomStaticSpace);
  paintEdge(c,g,leftLine,0,insets.top,insets.left,edgeHeight,true,leftShouldTile,leftNumTiledIcons,leftStaticSpace);
  paintEdge(c,g,rightLine,width - insets.right,insets.top,insets.right,edgeHeight,true,rightShouldTile,rightNumTiledIcons,rightStaticSpace);
  g.translate(-x,-y);
}

public void paintBorder ( Component c , Graphics g , int x , int y , int width , int height ) { if ( noBorder ) { return ; } if ( ! iconsLoaded ) { super . paintBorder ( c , g , x , y , width , height ) ; return ; } g . translate ( x , y ) ; if ( tlCorner . getImageLoadStatus ( ) == MediaTracker . COMPLETE ) { paintCorner ( c , g , 0 , 0 , tlCorner ) ; } if ( blCorner . getImageLoadStatus ( ) == MediaTracker . COMPLETE ) { paintCorner ( c , g , 0 , height - blCorner . getIconHeight ( ) , blCorner ) ; } if ( trCorner . getImageLoadStatus ( ) == MediaTracker . COMPLETE ) { paintCorner ( c , g , width - trCorner . getIconWidth ( ) , 0 , trCorner ) ; } if ( brCorner . getImageLoadStatus ( ) == MediaTracker . COMPLETE ) { paintCorner ( c , g , width - brCorner . getIconWidth ( ) , height - brCorner . getIconHeight ( ) , brCorner ) ; } int edgeWidth = width - ( insets . left + insets . right ) ; int edgeHeight = height - ( insets . top + insets . bottom ) ; paintEdge ( c , g , topLine , insets . left , 0 , edgeWidth , insets . top , false , topShouldTile , topNumTiledIcons , topStaticSpace ) ; paintEdge ( c , g , bottomLine , insets . left , height - insets . bottom , edgeWidth , insets . bottom , false , bottomShouldTile , bottomNumTiledIcons , bottomStaticSpace ) ; paintEdge ( c , g , leftLine , 0 , insets . top , insets . left , edgeHeight , true , leftShouldTile , leftNumTiledIcons , leftStaticSpace ) ; paintEdge ( c , g , rightLine , width - insets . right , insets . top , insets . right , edgeHeight , true , rightShouldTile , rightNumTiledIcons , rightStaticSpace ) ; g . translate ( - x , - y ) ; }
paints the border using the loaded corner icons and edge icons .
