public void paint(Graphics g,Component c){
  int x=c.getX();
  int y=c.getY();
  int width=c.getWidth();
  int height=c.getHeight();
  if (outerBorder != null) {
    if (paintOuterBorderFirst) {
      outerBorder.paint(g,x,y,width,height,c);
      paint(g,x + thickness,y + thickness,width - thickness * 2,height - thickness * 2,c);
    }
 else {
      paint(g,x + thickness,y + thickness,width - thickness * 2,height - thickness * 2,c);
      outerBorder.paint(g,x,y,width,height,c);
    }
  }
 else {
    paint(g,x,y,width,height,c);
  }
}

public void paint ( Graphics g , Component c ) { int x = c . getX ( ) ; int y = c . getY ( ) ; int width = c . getWidth ( ) ; int height = c . getHeight ( ) ; if ( outerBorder != null ) { if ( paintOuterBorderFirst ) { outerBorder . paint ( g , x , y , width , height , c ) ; paint ( g , x + thickness , y + thickness , width - thickness * 2 , height - thickness * 2 , c ) ; } else { paint ( g , x + thickness , y + thickness , width - thickness * 2 , height - thickness * 2 , c ) ; outerBorder . paint ( g , x , y , width , height , c ) ; } } else { paint ( g , x , y , width , height , c ) ; } }
draws the border for the given component , this method is called before a call to background painting is made .
