protected int inBorder(int x,int y){
  Border b=getBorder();
  if (b == null) {
    return UNDEF;
  }
  Insets i=b.getBorderInsets(this);
  if (x <= i.left) {
    return DOCK_WEST;
  }
  if (x >= getWidth() - i.right) {
    return DOCK_EAST;
  }
  if (y <= i.top) {
    return DOCK_NORTH;
  }
  if (y >= getHeight() - i.bottom) {
    return DOCK_SOUTH;
  }
  return UNDEF;
}

protected int inBorder ( int x , int y ) { Border b = getBorder ( ) ; if ( b == null ) { return UNDEF ; } Insets i = b . getBorderInsets ( this ) ; if ( x <= i . left ) { return DOCK_WEST ; } if ( x >= getWidth ( ) - i . right ) { return DOCK_EAST ; } if ( y <= i . top ) { return DOCK_NORTH ; } if ( y >= getHeight ( ) - i . bottom ) { return DOCK_SOUTH ; } return UNDEF ; }
get the border that mouse is in
