public void paintBorder(Graphics g){
  g.setPaintMode();
  super.paintBorder(g);
}

public void paintBorder ( Graphics g ) { g . setPaintMode ( ) ; super . paintBorder ( g ) ; }
we override this to set the paint mode on the graphics before the border is painted , otherwise we get an xor effect in the border .
